Add print button to ticket e-mail

Home Forums Ticket Products Event Tickets Plus Add print button to ticket e-mail

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #985804
    Peter de Moor
    Participant

    I’m using the Wootickets plugin, and I would like to give customers the possibility to print their tickets from inside the e-mail. Of course there’s a possibility to print the e-mail by using Control+P, and there’s a print button in Gmail, and probably other E-mail software/websites as well. But I’d like to have a button inside the e-mail which prints only the tickets (not the e-mail information like sent by, sent to, date, subject). It would be great if they could print a ticket per a4 page. Is there any way to do this?

    Thank you.

    #985821
    George
    Participant

    Hey Peter!

    I haven’t tested this customization myself, but it should indeed be possible with a few pieces of information – first, check out our Themer’s Guide to learn about how to customize various The Events Calendar plugin views → https://theeventscalendar.com/knowledgebase/themers-guide/

    Once you read through that, you’ll get the gist of making custom The Events Calendar views and could then make a custom version of the tickets-email.php file from in your theme. Start by simply duplication the original version of this file, so that everything else is there as-is, but then in your custom version just add the print button wherever you’d like.

    Now, onto adding this button itself – as mentioned, I haven’t tested this directly, but there’s a handy print() function in JavaScript that prints the content of whatever element, by ID, that you pass to the function. Try adding it to a button or typical link HTML tag, and pass the ID of the content you want to print. A great example of this if you’re not familiar is this Stack Overflow question, there are many more resources online too if you’re curious → http://stackoverflow.com/q/16894683

    Best of luck with this customization, cheers!

    George

    #986532
    Peter de Moor
    Participant

    Thank you for your quick response George.

    I tried your (StackOverflow) suggestion, I copied the email template file to my (child)theme (with the right paths). I edited some things, which works great. But I think/read JavaScript is not supported in e-mails.

    If I could redirect customers to a page within my website where they can print their tickets, it would be a good solution as well, but that’s not possible is it? Maybe i nice feature for future updates.

    Thank you for your help anyway,

    Peter

    #986649
    George
    Participant

    Hey Peter,

    It is possible to do the redirect solution you came up with, but indeed something that would take a decent amount of code customization.

    I’m really sorry about the limitations here…your patience and understanding are much appreciated despite these limitations.

    If you have any further followup questions, concerns, feedback, let me know!

    Thank you,
    George

    #991742
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add print button to ticket e-mail’ is closed to new replies.