Add event date/time to cart

Home Forums Ticket Products Event Tickets Plus Add event date/time to cart

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #78423
    Helen Duncan
    Participant

    Hi,
    The following thread was very useful while customising my cart for a client:

    Add ticket Event name on Cart and Email

    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.

    #78437
    Helen Duncan
    Participant

    Actually 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?

    #78741
    Barry
    Member

    Hi 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 🙂

    #78825
    Helen Duncan
    Participant

    Hi 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.

    #78943
    Kelly
    Participant

    Thanks 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=5

    Thanks in advance. 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add event date/time to cart’ is closed to new replies.