List Ticket Price on Event List

Home Forums Ticket Products Event Tickets Plus List Ticket Price on Event List

Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #43740
    digitalfusion
    Participant

    Is there a way to add a field (or re-label an existing one) to display a ticket price in the event listing, and ideally in the calendar grid hover and the event details on the single event page.

    It’d be nice to be able to scan a listing to see the events that are free and those that are not.

    This seems like something that would have been a part of the default WooTickets integration, no?

    Thanks,
    Michael

    #43773
    Barry
    Member

    You are completely free to edit your templates if you want to do something along these lines. In the first instance please take a look at:

    * Themer’s Guide for The Events Calendar
    * Tutorial: “What are template overrides, and how do I do them?”

    That will give you an overview of how to go about customizing The Events Calendar.

    You should be able to leverage the existing Event Cost field to help out here or, if you’re up for something a little more involved, then you could work directly with the ticket data.

    Have fun!

    #43783
    digitalfusion
    Participant

    Hmm. I’m familiar with template overrides, but I don’t see an Event Cost field anywhere. Is that available in the standard version of the The Events Calendar? If so, can you point me to where it’s documented? Thanks!

    #43807
    Barry
    Member

    Yes you should see it even if you aren’t using Events Calendar PRO.

    If you look at The Events Calendar meta box (in the event editor) you should see an Event Time & Date section, followed by Event Location Details, followed by Event Organizer Details then finally the Event Cost section – with a single field, Cost.

    Is that not present in your installation?

    #43842
    digitalfusion
    Participant

    Nope. I don’t see an “Event Cost” section. There’s nothing after the “Event Organizer Details” section.

    I am using WooTickets. Does that disable that section by any chance?

    #43855
    craigshaddick
    Participant

    I have the same problem, I cannot see the Event Cost section, a little annoying as I have just paid for WooTickets, with 6 pricing breaks per Event, and it doesn’t show my pricing in the list view which is a major flaw in my opinion! Can someone please let us know how this can be fixed? It should at least show a ‘from £XX’ like the standard WooCommerce plugin does if you add multiple price breaks.

    #43952
    Barry
    Member

    OK, my apologies – I was mistaken about the Cost field. I happened to have our Eventbrite addon running when I looked at this and it’s presence triggered the Cost field. If you are running just The Events Calendar/Events Calendar PRO plus WooTickets it will be hidden by default.

    So, that means there are a few other options:

    Instead of using the Cost field you could (if you are using Events Calendar PRO) create and use a new additional field for this purpose.

    A different approach could be to add code to check each event and optionally print some additional text (or whatever you want to do here) to indicate that it is a paid-for event.

    #46292
    1vertica
    Participant

    An addition to this as I am trying to do get the same result using the standard Events Calendar plugin and Wootickets.

    There is a field in the back-end to enter price for a ticket – is there code that looks up that price so that we can output it in the front end on the event list page and on the event description page?

    By using the wootickets add-on, it communicates with woocommerce to create a product that is linked to the event – there is then an add to cart button as standard on the event listing page at the bottom within the wootickets box.

    We want to output that ‘Add to Cart’ button on the event list page and at the top of the event description before the description so that users have plenty of opportunities to book.

    Has anyone located where to look up that code to use it in the respective page templates?

    A workaround would be to create the wootickets product, go to woocommerce and get the product ID, use a custom field to enter the woocommerce add to cart URL for that product ID in the event description back end, use the value in that custom field to create the button.

    I suppose the same is true for the price field …

    However, this is longwinded with extra steps to get the product ID code which Wootickets will be looking up anyway.
    We would also have to enter the price in 2 places which is confusing – again the field is already there in Wootickets.

    Has anyone had any joy with something similar – I can even see something similar in the showcase page https://theeventscalendar.com/showcase-item/victoria-symphony/

    #46314
    Barry
    Member

    There are various ways you can go about this.

    For instance, to have the ticket price (or range of prices) display for each relevant entry on the upcoming events list you might customize both your list.php template and also your tickets.php template.

    You could adapt this approach to show different information on other templates, too, or if you’re feeling adventurous you could create some custom functions to query if an event contains tickets and obtain/generate pricing data or the add to cart button that way.

    There are many ways to skin a cat 🙂

    #46590
    1vertica
    Participant

    Hi Barry
    Thank for the response.

    My developer has been looking at customising the templates above as mentioned but cannot see any tags for the wootickets price to insert into the templates.

    Nor can he see where the code is to put a the add to cart url behind a button on these pages.

    My question isn’t whether it is possible or not as it definitely is!

    The question is where is the code for these functions so that we don’t have to use the unecessary steps of adding custom fields …

    Thanks in advance (ps I am not a developer so apologies if my wording isn’t correct, hope I’ve explained the concept properly though!)

    #46603
    Barry
    Member

    To avoid any confusion, can I clarify first of all that you are happy with the approach I outlined for displaying ticket prices on the upcoming events list?

    If you need further help there please let me know – and once that’s tied up we can look at adding add to cart buttons.

    #46619
    1vertica
    Participant

    Hi Barry, we tried to merge code from the samples above where the price variable is displayed but it doesn’t display anything on our site live. Pastebins for these two files can be found below, maybe you could highlight why they don’t work for us?

    Pasted both those in and still does nothing.

    The modified list.php file is here:
    http://pastebin.com/e87A61Xu

    The modified ticket.php file is here:
    http://pastebin.com/7BERbGat

    Regards,
    Rob

    #46655
    Barry
    Member

    Hi Rob,

    Looks like you’re missing a line in tickets.php. If you refer back to the version I posted you should see a line like this:

    $wootickets_pricing[] = $product->get_price();

    It needs to be present and similarly positioned in your version.

    #46731
    1vertica
    Participant

    Hi Barry,
    We pasted this line into the tickets.php file and we still don’t see any price coming in on either the events list page nor the single event page.
    Latest tickets.php file is now http://pastebin.com/BBP4XDEG
    Rob

    #46758
    Barry
    Member

    OK, have you tried the actual list.php and tickets.php that I posted as is?

    I appreciate they may not incorporate other customizations you might have made, but it would give you a confidence check and if they work for you you could work back to build in your own customizations.

Viewing 15 posts - 1 through 15 (of 32 total)
  • The topic ‘List Ticket Price on Event List’ is closed to new replies.