This is a technical solution and quite advanced stuff. My hope is that EE will either consider adding this functionality to the Ticketing Add-on or make a fuller article on the subject.
We wanted to include a jpeg image of the ticket in our confirmation emails and so had to roll our own solution. Here is how we did it.
Problem:
No means in EE of putting an image of ticket in the emails.
No means in EE of attaching ticket to an email.
The ticket is rendered in the browser and QR code is rendered by JavaScript (no way of grabbing it separately)
Solution:
We opted for a workaround to trying to recreate the elements of the ticket and used a web2image converter to convert the entire web page of the ticket into a jpeg. The benefit of this is that you can maintain the same control over ticket designs per event etc and we simply swoop in and grab an exact copy of the ticket.
1.Create a custom shortcode to use in a message template (ours based on this code) https://gist.github.com/Pebblo/e87cc8e30c4848dcdfe2
2. Create a custom function to be called by the shortcode to do processing and helper functions for paths and naming.
3. Call the image2web service passing the URL to the ticket.
4. Receive the image of the ticket back and save to the uploads directory (or similar)
5. Return the link to the ticket image in the shortcode to create an image in the email.
The below code is what we used to solve this. It’s
not
going to work if you copy and paste it as its missing our context and it has some variables that need setting, but you should be able to work this out if you met my above requirements 😉 This meets our needs but of course there are lots of improvements to be made.
The service also does web2pdf but we you only be able to link to the pdf right now as EE doesn’t have a hook for attachments (yet-please!)
Thanks for taking the time to leave this valuable feedback. I’ve registered your suggestion and we will keep it in mind for future features and updates!
Viewing 1 reply thread
The support post ‘Include ticket image in email [solution]’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.