Before you continue reading this article it is recommend to check Introduction to MyTicket Events Plugin article first to better understand how this plugin might be useful to you.
With the help of MyTicket Events plugin you can generate beautiful PDF printouts suitable for:
- conference badges
- meetup events
- concert attendees
- party organizers
- other event types
Note that tickets have QR-code which can be validated with the help of free mobile application available under Play Market and called MyTicket Scanner App. Feel free to download it to test your tickets.
It is also recommend that you have some basic experience with HTML and PHP as you may need to dig into the code a little bit but at the same time you have freedom to customize your tickets in any desired way.
Below is the example of the default ticket that is being generated upon checkout and can be sent by email directly to your clients.
MyTicket Events Plugin supports two ticket types:
- General ticket that contains all records of the purchase and can be validated at once with the help of MyTicket Scanner App.
- Individual tickets, perfect when one person buys tickets for multiple people. Tickets are split into multiple PDF records upon checkout and can be sent individually to its holder by email. You can enable this ticket type from your WordPress admin under Appearance > Customizer > MyTicket section. This ticket type is perfect for conference badges where attendees name is printed on the badge along with the QR-code above. This ticket can be validated individually without affecting status of other ticket holders from the same checkout batch.
If you want to get more information on how MyTicket Scanner application works make sure to get through this article.
To start customizing your first ticket you need to copy templates folder of myticket-events plugin under your theme’s root folder.
Now copy templates folder to the root folder of your theme but make sure to rename template folder to myticket-events. See the image below.
Now you are ready to customize your first ticket. For example, go to ticket-individual folder and open index.php. This file is linked with mPDF library and WooCommerce plugin. You can modify HTML structure, add custom PHP code or call WooCommerce methods to get more data from the order and print it into the PDF ticket.
While this is too specific we will demonstrate a more simple example. Lets change the background image of the ticket that will be displayed without any offset and rendered behind main HTML content. For this purpose you can use these methods where https://kenzap.com/static/myticket-events/conference_badge.jpg is the path to publicly available image:
You can paste this code just in the beginning of the index.php file but after mPDF is first declared. See the image below:
So in the end you can have a pretty beautiful ticket preview as shown below. Note that all the data except ticket holder name and the QR-code is taken from the image itself (../conference_badge.jpg). You can also define your ticket structure with the help of HTML and CSS code but we recommend you to have a predesigned image as it will simplify the development process of your printout.