Add important ticket information to emailed ticket?

Home Forums Ticket Products Event Tickets Plus Add important ticket information to emailed ticket?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #232981
    tombyrom16
    Participant

    How do i add extra information to the ticket that is emailed automatically to the recipient? As the ticket only includes certain fields and doesn’t include the ticket description which is bizarre?

    My event requires certain information on the ticket itself so i need to be able to add this information into the emailed ticket that the customer uses to get into the event.
    thanks

    #233694
    Barry
    Member

    Hi!

    A great starting point is our Themer’s Guide, which explains the basics for safely overriding and customizing our templates:

    Themer’s Guide

    In this case you’re probably going to be interested in the email.php template, the original being located in:

    the-events-calendar/views/tickets/email.php

    The trick is to work back from the ticket ID – available as $ticket[‘ticket_id’] within the loop. That represents a post which has a piece of post meta attached to it called _tribe_wooticket_product … in turn this is the ID of the underlying WooCommerce product and provides access to the ticket description:

    $product_id = get_post_meta( $ticket['ticket_id'], '_tribe_wooticket_product' );
    $product = new WC_Product( $product_id );
    $description = $product->post_excerpt;

    To save yourself from reinventing the wheel you might also leverage a library of existing code like this (unofficial) one.

    Beyond that, we’re always interested in new feature requests if you think others would like to see this (or you could upvote any suitable existing feature requests).

    Does that help?

    #723315
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Add important ticket information to emailed ticket?’ is closed to new replies.