put some additional info into ticket

Home Forums Ticket Products Event Tickets Plus put some additional info into ticket

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #971580
    ernst
    Participant

    Hi 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!

    #971620
    George
    Participant

    Hi 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!
    George

    #971638
    ernst
    Participant

    hey George,
    thanks for your reply – that’s exactly what i was searching for!
    keep up the good work!

    thanks
    ernst

    #971642
    George
    Participant

    Glad to hear it! Thanks for the update and the kind words 🙂

    Best of luck with your site,
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘put some additional info into ticket’ is closed to new replies.