ETickets4Hikashop need hikashop starter (au least) 1.5.8 to 2.0, and joomla 2.5.
If a product is identified as an electronic ticket in the admi interface, the plugin will be called when an order is created or modified.
If the order status is "shipped" or "confirmed", the e-ticket will be created with a valid status (1).
If the order has a different status, the eticket is not destoryed, but its status is changed to invalid (0).
After validation with ET4HValidator, used tickets will have a "validated" status (2). That's why it is intersting to upload back the xml file afterthe event.
Every time an email regarding an order is sent, if the order has electornic tickets, they will be attached as pdf files.
Etickets can also be downloaded by the client from the "orders" page in Hikashop frontend.
ETickets4Hikashop ships a "light" the tcpdf library for the pdf generation.
You can install ETickets4Hikashop by either downloading the archive and uploading it or by using the "install from url" box by pasting the following link : http://www.thomasbouffon.fr/joomla/images/data/etickets4hikashop/etickets4hikashop-latest.zip.
Finally, do not forget to activate your extension in the plugin management page.
To create your first e-ticket, create a new product in Hikashop. Right under the product description, there is an "Electronic ticket properties" fieldset.
After having save your product for the first time, this fieldset will provide new options :
In this fieldset, you can enter an evnt date and place. Other possibilities are available :
- Display the sold tickets in a modal window
- Download the list of sold tickets as an xml file for ET4HValidator
- Upload back the xml file after validation to update the database after the event
(The last two options are only available when the product cannot be bought anymore - product unpublished or sale date expired).
The electronic ticket is generated from a php/html template which will be interpreted by tcpdf. For more information bout tcpdf, you can have a look at the official examples.
There are 2 options to customize the electronic ticket : either customizing the generic template to affect all the products, either create a custom template for a particular event/product.
Generic template customization
This customization will affect all the generated tickets. in order to customize the template, copy the etickets.php file (available for instance on my gitorious repository) to the images/etickets directory under the Joomla root.
Specific event customization
The principle is the same, except that the template must be named images/etickets/ProductCode,php wher ProductCode is the product code displayed in the product list in Hikashop
One exception : the variants
At the moment, variants are considered as standalone products, which means that every variants has its xml file and own template.
In order to validate multiple variants, you need to open as many instances of ET4HValidator as the number of variants you have (which is possible on the same computer).
- Written by Thomas Bouffon