Reorder ticket values on event listings page and individual events

Home Forums Calendar Products Events Calendar PRO Reorder ticket values on event listings page and individual events

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1025433
    Michael Wilkinson
    Participant

    How do we change the order of the ticket prices on the main page of events and on each individual event?

    At the moment it gathers the prices in ascending order e.g. £5-£25 but we want it to either say “£25-£5”, or list the prices in descending order like “£25, £15, £5”.

    #1026388
    Geoff
    Member

    Hey @Michael, thanks for getting in touch!

    Good question. It is indeed possible to change the order of tickets, at least on the individual event. In fact, we have an article that walks through that and provides some examples to help get you started. Definitely give that a look because its quite helpful.

    It might be possible to do the same in the main calendar, however I think it would take quite a bit of custom development. The calendar is designed to display events by their start dates and times, so tickets aren’t factored into the equation. Plus, there could be multiple tickets per event, so that would be tough as well. However, you could possibly use the tribe_get_cost() function as a means to create a new query and order events by the cost.

    Will this help you get started? Please let me know. 🙂

    Cheers!
    Geoff

    #1026399
    Michael Wilkinson
    Participant

    Hi Geoff

    Thanks for coming back to me, although I’m not sure that answers my question. I have read the article that you link to, but that is not what I am trying to resolve.

    My issue is this. Please take a look at this page: http://www.londonfirebird.com/whatson/
    Where it says “£15-£35” for the first event, I want to change that so it shows in reverse order, e.g. £35-£15. Is that at all possible? If it is not, is there a way to hide this information? The same issue then applies on the event pages themselves – take this one: http://www.londonfirebird.com/event/fantasia/ – where it says “Cost: £15-£35”. Again, I would like to either reverse the order, or just remove that line entirely, since the various tickets are listed below anyway.

    Kind regards
    Michael

    #1026412
    Geoff
    Member

    Hi Michael, thanks for following up!

    My issue is this. Please take a look at this page: http://www.londonfirebird.com/whatson/
    Where it says “£15-£35” for the first event, I want to change that so it shows in reverse order, e.g. £35-£15. Is that at all possible?

    The second part of my last answer addresses this. It is possible, but you may need to make a filter or a new query altogether to change the order of events by price.

    If it is not, is there a way to hide this information?

    You can certainly hide the pricing information using CSS, perhaps something like this:

    .tribe-events-event-cost {
    display: none;
    }

    …which can be used alongside your theme’s styles or in a plugin like Simple Custom CSS.

    The same issue then applies on the event pages themselves

    My mistake! I had read your thread title and question as you wanting to change the order of tickets on the event page–however, you want to change the order of the price range. You could override the single event template and then use the tribe_get_minimum_cost() and tribe_get_maximum_cost() functions to display the costs in the order you want in place of the existing cost. For example:

    <?php echo tribe_get_maximum_cost() . ' - ' .  tribe_get_minimum_cost(); ?>

    Then again, the same CSS from above should also hide the cost range from the event page as well. 🙂

    Sorry for missing your question the first time through, but I hope this helps!

    Geoff

    #1030506
    Michael Wilkinson
    Participant

    Thanks Geoff. When I add that custom CSS to remove the ticket prices, it removes them completely from the Events page which is great, it also removes them from each individual event but it does not remove the “Cost:” bit that appears before it. How can I remove that as it looks odd at the moment to say “Cost: ____”

    Did I also read somewhere that you might be introducing custom fields in your next update, so I could manually enter “Cost: £35, £25, £15”?

    #1032597
    Geoff
    Member

    Hey Michael!

    How can I remove that as it looks odd at the moment to say “Cost: ____”

    I think the best way to remove this instance altogether is to modify the template itself. You can do that by:

    • Making a copy of the details.php template. It’s located at /the-events-calendar/src/views/modules/meta/details.php
    • Make a new folder in your theme directory called tribe-events (if it isn’t already there)
    • Make a new folder in that one called modules
    • Make a new folder in that one called meta
    • Drop the copied details.php file in that last folder

    Now that the template is in your theme, you can modify it to suit your needs. In this case, remove the Cost information–which is lines 92-96 for me.

    Did I also read somewhere that you might be introducing custom fields in your next update, so I could manually enter “Cost: £35, £25, £15”?

    We actually already have custom fields available in Events Calendar PRO and those would indeed display in the same meta details area. I think what you’re referring to is that we’re going to be adding the ability to collect custom information from attendees when purchasing tickets for an event. That is is on the way!

    Cheers,
    Geoff

    #1032625
    Michael Wilkinson
    Participant

    Thanks Geoff. That sounds like a great solution. I will try that.

    Can you tell me how to add a custom field to the meta details area? (We have the PRO version)

    #1032640
    Geoff
    Member

    Sure thing! We have an article here that covers PRO’s additional fields in much more detail than I could in this thread. 🙂

    Creating Additional Fields

    Cheers,
    Geoff

    #1075841
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Reorder ticket values on event listings page and individual events’ is closed to new replies.