Home › Forums › Ticket Products › Event Tickets Plus › Event date and name in the cart
- This topic has 5 replies, 3 voices, and was last updated 10 years ago by
Support Droid.
-
AuthorPosts
-
March 22, 2016 at 10:03 am #1092465
Riccardo
ParticipantHi,
when I add a event, there is a date, name event.
The ticket name maybe “vip”, “normal”… but when I add to cart I have only the ticket name and not the others info.
Is it possibile to integrate the others information in the order too?
thanksMarch 22, 2016 at 3:58 pm #1092651Riccardo
ParticipantHi,
so I want to add the info (date of event, title of the event) in the PDF invoice.
How can I do it?
ThanksMarch 23, 2016 at 12:48 pm #1093068Josh
ParticipantHey Riccardo,
Thanks for reaching out to us!
You can take a look at the WooCommerce documentation for customizing their cart views as a start here. To get the information you’re looking for though, you’ll need to first get the event associated with the ticket “product” that is in the cart. For this, you can get the product ID and use that to get the “_tribe_wooticket_for_event” meta for that product. This meta is the ID for the associated event.
From there, you can use function like tribe_get_start_date() and get_the_title() to get the the information that you would like to display within the cart.
Let me know if this helps.
Thanks!
March 23, 2016 at 2:32 pm #1093139Riccardo
ParticipantHi,
this is the function for the cartadd_filter( 'woocommerce_cart_item_name', 'woocommerce_cart_item_name_event_title', 10, 3 ); function woocommerce_cart_item_name_event_title( $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 del giorno %s</strong></a>', $title, get_permalink( $event_id ), get_the_title( $event_id ), tribe_get_start_date( $event_id ) ); } return $title; }can you help me for the thank you, checkout function and the pdf invoice?
thanksMarch 25, 2016 at 11:21 am #1094183Josh
ParticipantHey Riccardo,
I’m not sure I follow on the PDF ticket? Are you referring to the general ticket email that gets sent when a user purchases? Or do you have another plugin that converts the emails into PDFs?
Thanks!
April 9, 2016 at 9:35 am #1100444Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Event date and name in the cart’ is closed to new replies.
