Editing tickets – how to add free HTML box

Home Forums Ticket Products Event Tickets Plus Editing tickets – how to add free HTML box

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #861851
    seome
    Participant

    When I edit a SPECIFIC ticket, I would like to have a free HTML box in that area (different info for each ticket). The HTML box will show information only via the e-mail sent to paying customers who purchased an event. The HTML box content should not show online – only to paying customers.

    Attached please find a screenshot of the ticket editing area, where we would like to add the HTML box:
    https://drive.google.com/file/d/0B_l7u7hENXgYM2QxaGhyVXdxRnM/view?usp=sharing

    Regards

    #862280
    Geoff
    Member

    Hi there, Shmuel! Thanks for getting in touch and welcome to the forums. 🙂

    Good question. This sort of customization is beyond what we can provide here in the forums, but let’s see if I can get you started in the right direction to help you make it happen.

    If you want to get a new field in the exact location you shared in the screenshot, you can refer to our documentation to locate the hooks you’d want to use to modify that area of the editing screen.

    Another way would be to consider using a plugin like Advanced Custom Fields to add that field to the editing screen for you. It won’t be exactly where you want it, but it’s a much simpler solution.

    Once you have the editing screen the way you want it, you’ll need to place that content in the email template. You can override the email.php template and modify it to display multiple photos where the header image is specified. To override the template:

    • Make a copy of it. It’s located at /the-events-calendar/views/tickets/email.php
    • Place the copied file in a new directory in your theme called /tribe-events/tickets

    These steps are outlined in greater detail in our Themer’s Guide.

    I’m sorry I don’t have more of a concrete solution for you, but this should get you started in the right direction.

    Cheers!
    Geoff

    #870774
    seome
    Participant

    Hi Geoff
    Your solution sounds very rational, but I can’t seem to actually perform the last part of it. We’ve created a cutome filed, but I’m trying to insert the custome fields code into email.php, in order to present field value – but it doesn’t work. It seems to require some kind of change in the code itself – can you please review and let me know if it’s ok?

    I’ve tried:
    <?php echo the_field(‘link_to_video’); ?>

    and also:
    <?php echo $event->the_field(‘link_to_video’); ?>

    Thanks again. Much appreciated!

    #873807
    Geoff
    Member

    Hi there, Shmuel! Thanks for following up.

    That first snippet looks correct to me based on the examples provided in the ACF documentation.

    That’s strange. I tried the steps provided from my first reply and everything seems to work. I was able to get your ACF example to work as well. Is it possible your template override is in the wrong location? That might be worth checking.

    You could try editing email.php from the plugin directory to see if the changes take hold there. However, I would only use that as a testing method to see if your overrides are working and would revert the changes back.

    Cheers!
    Geoff

    #875409
    seome
    Participant

    Hi Geoff
    Eventually your explanation was excellent, and we managed to do it.
    Thank you very much for all your help.

    Regards
    Shmuel

    #876629
    Geoff
    Member

    Awesome, so glad to hear it Shmuel!

    I’m going to go ahead and close this thread, but please feel free to hit us up with a new thread if any other questions pop up. We’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Editing tickets – how to add free HTML box’ is closed to new replies.