Home › Forums › Ticket Products › Event Tickets Plus › Show event date in WooCommerce cart next to ticket
- This topic has 3 replies, 2 voices, and was last updated 8 years, 3 months ago by George.
-
AuthorPosts
-
January 3, 2016 at 9:58 am #1049457SiobhanParticipant
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,
SuzieJanuary 5, 2016 at 9:52 am #1050621GeorgeParticipantHey 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!
GeorgeJanuary 6, 2016 at 1:25 am #1050918SiobhanParticipantHi 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
January 6, 2016 at 7:19 am #1051188GeorgeParticipantNo 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 -
AuthorPosts
- The topic ‘Show event date in WooCommerce cart next to ticket’ is closed to new replies.