Home › Forums › Ticket Products › Event Tickets Plus › put some additional info into ticket
- This topic has 3 replies, 2 voices, and was last updated 10 years, 10 months ago by
George.
-
AuthorPosts
-
June 20, 2015 at 5:57 am #971580
ernst
ParticipantHi Folks,
can you tell me how i can put some extra info into the ticket mail that is sent to the customer?
i see that i can put some custom fields into the ticket section of the event calendar, but i don’t know how to use it.
i would like to put some terms & conditions into the ticket, what is the best approach for that? i know that i can edit an override template, but i assume that this is a quick & dirty hack.thanks for your help!
June 20, 2015 at 9:24 am #971620George
ParticipantHi Ernst,
While there’s not quite a “quick and dirty hack”, you should be able to make the customizations you’d like here.
We can’t offer line-by-line code examples, but there are some great resources that you can use to piece something useful together.
The first thing to ensure is that you know how to customize our views in general. This includes Email templates and tickets-related things. To learn how to do this, check out our knowledgebase guide here → https://theeventscalendar.com/knowledgebase/themers-guide/
Using the principles outlined in that article, the file you’ll want to customize for ticket emails is located in the-events-calendar/src/views/tickets/email.php.
So, once you have a version of this file in your theme so that you can safely customize it, you can start playing around with code, including using the custom fields you mentioned that you’ve created.
Using values from custom fields is as simple as using the WordPress core function get_post_meta(). Learn about this function here → https://codex.wordpress.org/Function_Reference/get_post_meta
For example, if you make a custom field for tickets called “_example_ernst_is_cool”, you’d call the value of that field for that event with code similar to this:
$example = get_post_meta( get_the_ID(), '_example_ernst_is_cool', true );Now, the variable called $example “holds” that value, and you can echo it, do other stuff with it, etc.
I hope these pieces of information lay a solid foundation for you to start building upon, and that you can make some useful customizations on your site.
Let us know if this helps, and/or if you have any other questions or concerns.
Thanks!
GeorgeJune 20, 2015 at 10:25 am #971638ernst
Participanthey George,
thanks for your reply – that’s exactly what i was searching for!
keep up the good work!thanks
ernstJune 20, 2015 at 10:30 am #971642George
ParticipantGlad to hear it! Thanks for the update and the kind words 🙂
Best of luck with your site,
George -
AuthorPosts
- The topic ‘put some additional info into ticket’ is closed to new replies.
