Home › Forums › Ticket Products › Event Tickets Plus › Adding event and date title to cart/checkout and booking confirmation email
- This topic has 13 replies, 4 voices, and was last updated 9 years, 1 month ago by
Rachel.
-
AuthorPosts
-
February 8, 2017 at 4:52 am #1231226
Rachel
ParticipantHello,
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.
February 9, 2017 at 7:44 am #1232018Andras
KeymasterHello 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.
Cheers,
AndrasFebruary 9, 2017 at 7:55 am #1232025Rachel
ParticipantThank 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.February 10, 2017 at 7:07 am #1232786Andras
KeymasterHi 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,
AndrasFebruary 10, 2017 at 8:19 am #1232833Rachel
ParticipantThank 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?
February 13, 2017 at 3:54 am #1233721Andras
KeymasterHello 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,
AndrasFebruary 13, 2017 at 5:55 am #1233759Andras
KeymasterHello 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,
AndrasFebruary 13, 2017 at 7:36 am #1233814Rachel
ParticipantThank 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.
February 15, 2017 at 3:59 am #1235107Andras
KeymasterHi Rachel,
tribe_events_titleortribe_get_events_titleshould 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,
AndrasFebruary 15, 2017 at 2:42 pm #1236510Andras
KeymasterHi Rachel,
This snippet might also help you. Check it out.
https://gist.github.com/ggwicz/92f5703f52dc9222ce8a
Does that help?
Cheers,
AndrasFebruary 16, 2017 at 7:07 am #1238543Rachel
ParticipantThank 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.
February 17, 2017 at 2:30 am #1239724Andras
KeymasterHello 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
March 11, 2017 at 8:35 am #1252827Support Droid
KeymasterHey 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 -
This reply was modified 9 years, 2 months ago by
-
AuthorPosts
- The topic ‘Adding event and date title to cart/checkout and booking confirmation email’ is closed to new replies.
