Home › Forums › Ticket Products › Event Tickets Plus › Tickets date shown in the email
- This topic has 8 replies, 2 voices, and was last updated 10 years ago by
Geoff.
-
AuthorPosts
-
April 14, 2016 at 4:40 am #1102354
Cowowo S.L
ParticipantHi, I have Events that are open for more than one day so I did multiple tickets, one ticket for each day of the event, but in the email send to the customer with the ticket the date that appears is the date of the Start event and not of the end of the ticket.
I have to do an Event for each day then? or is it possible to change the date sended in the email for the end of the ticket date?
April 14, 2016 at 7:40 am #1102450Geoff
MemberHey there and welcome to the forums!
That’s correct — the tickets are tied to the start date of the event rather than the sale date of the tickets.
It is certainly possible to modify the ticket email and remove the event date from it. The template is called email.php and is located in wp-content/plugins/event-tickets/src/views/tickets/email.php. I would also suggest checking out our Themer’s Guide for more details on how template overrides work as you get started.
Sorry I don’t have more of a concrete answer for you here, but I hope this at least helps answer your question.
Thanks!
GeoffApril 15, 2016 at 2:06 am #1102915Cowowo S.L
ParticipantThank you for your answer, still you don’t have a function to get the value of the end date sale ticket? Thanks for the link to the themers guide it could be useful to modify different files.
April 15, 2016 at 7:33 am #1102985Geoff
MemberHey there! Thanks for following up.
I don’t have a specific function, but you can call the start date using something like this:
<?php echo Tribe__Tickets__Ticket::get_instance( $ticket_id, ‘_ticket_end_date’ ); ?>
I haven’t tested that, but hopefully it at least helps get you started to grab the ticket start date.
Cheers!
GeoffApril 15, 2016 at 9:33 am #1103055Cowowo S.L
ParticipantHi, I’ve been trying to put that piece of code in the place where is print the $start_date variable. I did a few modifications because this part is inside of foreach for de tickets array:
<?php echo Tribe__Tickets__Ticket::get_instance( $ticket[‘ticket_id’], ‘_ticket_end_date’ ); ?>
But that didn’t work, after a purchase the email for the tickets wasn’t sended.
April 15, 2016 at 11:18 am #1103162Geoff
MemberHere’s a function you could add to your functions.php file and then call in the template to return a ticket’s end sale date:
add_filter( 'event_tickets_email_include_end_date', 'tribe_show_tickets_end_date' ); function tribe_show_tickets_end_date( $bool ) { return true; }I do want to note that we are fairly limited in how much we can support custom development questions like this, but I do hope this at least helps get you started!
Thanks,
GeoffApril 15, 2016 at 11:54 am #1103196Geoff
MemberActually, scratch that. One of the developers on our team, George, took a stab at modifying the email template file and came up with a good example you can use to work off of. 🙂
April 18, 2016 at 4:02 am #1103681Cowowo S.L
ParticipantHi , thanks for your answer, I tried the email code and:
get_post_meta( $ticket[‘ticket_id’], ‘_ticket_start_date’, true );That didn’t return anything, but don’t worry I told my client to put the date in the name of each ticket so the customers will not get confused.
April 18, 2016 at 7:51 am #1103769Geoff
MemberShoot, I really thought the code in the email template would do the trick. I’m really sorry about that, but thanks for following up.
If there’s anything else you need, please let us know in a new thread and we’d definitely be happy to help.
Cheers,
Geoff -
AuthorPosts
- The topic ‘Tickets date shown in the email’ is closed to new replies.
