Home › Forums › Ticket Products › Event Tickets Plus › Add event date/time to cart
- This topic has 4 replies, 3 voices, and was last updated 12 years, 5 months ago by
Kelly.
-
AuthorPosts
-
November 25, 2013 at 4:26 am #78423
Helen Duncan
ParticipantHi,
The following thread was very useful while customising my cart for a client:but i’d also like to add the event date/time to the cart as well. There will be instances where customers will be booking for multiple events at any one time and this will be the only way to differentiate between the entries in the cart page.
How would i go about getting the date/time of the event and plugging this into the cart.php template?
Many thanks,
Adam.
November 25, 2013 at 7:19 am #78437Helen Duncan
ParticipantActually the aforementioned thread has a flaw.
the$event = $events[0];line basically selects the first array element and therefore the line$title = $event->post_title;will always output the same information regardless of the product in the basket.This hasn’t been picked up on the aforementioned thread so therefore I can only assume i’m doing something incorrect with the supplied code. i’m using this in my cart.php template file.
Can anyone shed any light on getting this to work alongside my previous request?
November 26, 2013 at 3:07 pm #78741Barry
MemberHi Adam – that snippet was really just a basic example to get you started and show the mechanics of the process.
will always output the same information regardless of the product in the basket.
I’m not quite sure what you mean here – but I’d point out that you would need to repeat the process of loading the associated event per line item (at least for each item that is an event ticket) … in which case you should not retrieve the same event post title – unless of course each ticket in the cart was related to the same event.
Though not officially supported by Modern Tribe you might find this plugin to be helpful if only as a template for your own solution. Beyond that I’m afraid we can’t help much more with customizations other than to wish you luck 🙂
November 27, 2013 at 1:55 am #78825Helen Duncan
ParticipantHi Barry,
Thanks for the response. Your plugins do a really great job and I totally understand that the plugins themselves are unable to modify the WooCommerce templates. I appreciate your help on this and that you offer advice on how to modify WooCommerce templates even though they aren’t your responsibility.
I’ll check out the plugin you suggested. In the meantime the solution I have decided upon is to name the tickets with as much info as possible such as:
Event name, 10am-2pm, Wed 27 nov 2013 – Adult Ticket
This obviously requires a bit more data entry for the person setting up tickets but it’s an interim solution for the issue I was facing before.
November 27, 2013 at 11:58 am #78943Kelly
ParticipantThanks so much for the kind words, Adam. It sounds like you’ve arrived at what is surely the simplest solution. If you do come up with anything else that you’d like to share, we’d be very interested in hearing about it! 🙂
By the way, if you have a minute or two, we will love it if you would write a few words for us here :
http://wordpress.org/support/view/plugin-reviews/the-events-calendar?filter=5Thanks in advance. 🙂
-
AuthorPosts
- The topic ‘Add event date/time to cart’ is closed to new replies.
