Home › Forums › Ticket Products › Event Tickets Plus › Add print button to ticket e-mail
- This topic has 4 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
July 13, 2015 at 5:46 am #985804
Peter de Moor
ParticipantI’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.
July 13, 2015 at 6:30 am #985821George
ParticipantHey 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
July 15, 2015 at 3:05 am #986532Peter de Moor
ParticipantThank 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
July 15, 2015 at 8:56 am #986649George
ParticipantHey 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,
GeorgeJuly 30, 2015 at 7:05 am #991742Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Add print button to ticket e-mail’ is closed to new replies.
