Adding event and date title to cart/checkout and booking confirmation email

Home Forums Ticket Products Event Tickets Plus Adding event and date title to cart/checkout and booking confirmation email

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1231226
    Rachel
    Participant

    Hello,

    I’m looking to add the event date and event title (event date is the most important) to the check out page and booking confirmation email.

    I found this previous post about how to add it to the cart page, however the custom code is missing?

    I’ve attached two images showing the places I would like to add the date and title.

    Thanks.

    #1232018
    Andras
    Keymaster

    Hello Rachel,

    Thanks for reaching out with your question.

    I believe the below extension will be the one that does this trick for you. Try and let me know how that works out.

    https://theeventscalendar.com/extensions/add-event-and-attendee-information-to-woocommerce-order-details/

    Cheers,
    Andras

    #1232025
    Rachel
    Participant

    Thank you for your response. I have downloaded that plugin however it doesn’t seem to work. I’ve manually dropped the plugin into my /plugin directory and also tried adding it via the WordPress panel and neither work.

    I receive this message when trying to upload the plugin via WordPress (image attached).

    Unpacking the package…
    
    Installing the plugin…
    
    The package could not be installed. No valid plugins were found.
    
    Plugin install failed.
    #1232786
    Andras
    Keymaster

    Hi Rachel, I do apologize for that glitch. It looks like the genie of uploads played a trick on us. 🙂

    Anyway, I corrected that download, so please try downloading and installing it again. It should work now, I tested it locally.

    Test the extension and let me know how that works out for you.

    Cheers,
    Andras

    #1232833
    Rachel
    Participant

    Thank you Andras. I have re-downloaded the files and uploaded the plugin which is now activated.

    However it doesn’t seem to be doing anything on the cart or emails. I’ve attached a screenshot of the cart page, which is untouched and is the standard template. Is there still an issue with the plugin?

    #1233721
    Andras
    Keymaster

    Hello Rachel,

    I’m sorry, I believe I misunderstood your original question.

    Unfortunately we don’t have a ready solution / snippet for that and we are limited in supporting customizations, but I can point you in the right direction.

    As for the email, that could be done with a template override. Here are 2 articles that should help you get started on that:

    https://theeventscalendar.com/knowledgebase/themers-guide/

    https://theeventscalendar.com/knowledgebase/template-overview/

     

    You will need to create an override for this file:

    wp-content\plugins\event-tickets\src\views\tickets\email.php

    Here:

    [your-theme]/tribe-events/tickets/email.php

    And you will need to print / echo out the information you need at the proper place, I’d say somewhere around like 340.

    As for the cart page, give me some time to check around if anyone on the team has something for this.

    Thanks and cheers,
    Andras

    #1233759
    Andras
    Keymaster

    Hello again Rachel,

    I checked around with the team and there is a solution for this. It is a bit older so it might or might not work, but it should definitely get you started on the right path.

    https://github.com/barryhughes/woot-library/wiki/Add-event-name-and-date-to-cart-page

    Let me know if I can be of any more assistance.

    Cheers,
    Andras

    #1233814
    Rachel
    Participant

    Thank you Andras.

    I have set up my own /woocommerce/cart/cart.php template and have added echo tribe_get_start_date( $event_id, false ); to display the event date however it only shows today’s date (not the event date). I’m also struggling to find the right function in your list to echo the event title too?

    Could you let me know which functions will display the event title and event date please?

    • This reply was modified 9 years, 2 months ago by Rachel.
    #1235107
    Andras
    Keymaster

    Hi Rachel,

    tribe_events_title or tribe_get_events_title should show you the title and the one you used should indeed show the start date.

    Let me try to get a fresh pair of eyes to look at this. Please hang in there.

    Thanks,
    Andras

    #1236510
    Andras
    Keymaster

    Hi Rachel,

    This snippet might also help you. Check it out.

    https://gist.github.com/ggwicz/92f5703f52dc9222ce8a

    Does that help?

    Cheers,
    Andras

    #1238543
    Rachel
    Participant

    Thank you, that snippet of code that is definitely getting me closer to what I need.

    I still need to display the event date. I’ve tried to customise it using different methods but I cannot get it to display.

    This is what I have so far:

    add_filter( 'woocommerce_cart_item_name', 'example_testing', 10, 3 );
    function example_testing( $title, $values, $cart_item_key ) {
    	$ticket_meta = get_post_meta( $values['product_id'] );
    	$event_id = absint( $ticket_meta['_tribe_wooticket_for_event'][0] );
    	if ( $event_id ) {
    		$title = sprintf( '%s for <a href="%s" target="_blank"><strong>%s</strong></a>', $title, get_permalink( $event_id ), get_the_title( $event_id ), tribe_get_start_date($event_id) );
    	}
    	return $title;
    }

    Once I can display the event date alongside the title it will all be sorted!

    Thank you for your help so far.

    #1239724
    Andras
    Keymaster

    Hello Rachel,

    Awesome job on that.

    I tweaked the code a bit and now it should show the start date & time as well on the cart page. Copy the code from here:

    https://gist.github.com/andrasguseo/92597c4690cf5366cdb69e385cc32859

    Does this give you the result you need? Let me know.

    Andras

    #1252827
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Adding event and date title to cart/checkout and booking confirmation email’ is closed to new replies.