Show event date in WooCommerce cart next to ticket

Home Forums Ticket Products Event Tickets Plus Show event date in WooCommerce cart next to ticket

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1049457
    Siobhan
    Participant

    Hi There,

    I’ve already followed your instructions on adding the event title in the WooCommerce cart (worked perfectly).

    We have multiple events with the same name (some of them running 5 days a week) so it would be good to have the event date too (especially for when customers book up for several events at once).

    Currently at the check out it displays:
    ‘Ticket Type’ for ‘Event Name’
    I’d like to add ‘on DD/MM/YY’

    Would this be possible?

    Best Wishes,
    Suzie

    #1050621
    George
    Participant

    Hey Suzie,

    Thanks for reaching out โ€“ย can you share a link to the instructions you are referring to about adding titles to the WooCommerce cart?

    Just curious about that โ€“ย we unfortunately cannot help with custom code here, but this might be a fairly simple customization and I’d love to help out if I can ๐Ÿ™‚

    Thanks!
    George

    #1050918
    Siobhan
    Participant

    Hi George,

    Sorry I forgot to add a link the thread I got the instructions from.
    This is it: https://theeventscalendar.com/knowledgebase/show-the-event-title-in-the-cart-next-to-the-ticket/

    I am looking to add the event date after the title.

    Not sure if this is possible?

    Thanks!

    Suzie

    #1051188
    George
    Participant

    No problem Suzie! Thanks for sharing this.

    Adding the start date is indeed possible, but this is something you’ll need to play around with a bit to find what works best for your site. For example, you can add just the “start date” to the existing content by looking at the bit of code right at the bottom of that snippet in that article, which looks like this:


    return $title;

    If you change that to something like this, then the start date will be added after the title:


    return $title . ' โ€“ย ' . tribe_get_start_date( $event_id );

    Need to add the End Date, too? Or other date-related aspects of the given event? To explore the options and play around with things, head into your plugin files for The Events Calendar and look for the following file:

    the-events-calendar/common/src/functions/template-tags/date.php

    There’s a litany of useful functions here that will get start time, start date, end time, end date, some combination of these things, and so on.

    Check out the file; read through the code and the available functions; and with this information and some Googling if anything pops up that you’re not familiar with, I’m sure you’ll be able to something useful together.

    Since we cannot help with code customizations, I will unfortunately have to go ahead and close up this thread for now ๐Ÿ™ But I hope that the information I’ve shared here helps! And if other support issues arise, you can open a new thread any time.

    Best of luck with your customizations!
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Show event date in WooCommerce cart next to ticket’ is closed to new replies.