When the Gift Voucher plugin is installed, a new document template for gift vouchers is created. This document template can be customised or duplicated as often as you like to create different document templates, e.g. with different voucher formats and voucher motifs. Below you will learn how to make these adjustments.
Customise the default document template
Under Configuration → Basic Settings → Shop Settings → PDF document creation you can edit the template for gift vouchers. In the Elements section, the following areas can be adjusted:
- the address of the online shop (Voucher_Shopinfo)
- the logo of the online shop (Voucher_Logo)
- the information text on how to redeem the voucher (Voucher_Redemptioninfo)
- the conditions for redeeming the voucher (Voucher_Redemptionconditions)
- the image on the front of the voucher (Voucher_Coverimage)
- the image on the back of the voucher (Voucher_Backimage)
- the date of issue and serial number of the voucher (Voucher_Date_And_Serial)
- the validity date of the voucher (Voucher_Valid_To)
Click on View Structure to see which element is displayed at which position in the voucher document.
Please also note the following information:
- When folded, the voucher measures approximately 15 x 11 cm. To be able to print at 180 DPI, you should use an image with a resolution of at least 1100 x 800 pixels for the cover image and the image on the back.
- You can adjust the titel Voucher and the text Value in € via Configuration → Snippets → Namespaces → documents → viison coupon → coupon.
- The specifications for spacing, items per page and pagination are not interpreted in the standard template. You can find more information on creating PDF documents here.
You can check saved changes using the Preview button.
Possible adjustments at subshop level
It is possible to customise the contents of the gift voucher document at subshop level. To do this, click on the globe in the Name field on the right under Configuration → Basic Settings → PDF Voucher Creation. There, the individual subshops are available for selection and the elements can be adapted accordingly.
Using your own document template
The creation of your own document templates is not the subject of this manual, which is why the procedure required for this is only explained in basic terms below.
Own templates must be selected via the Template field within the configuration of the document template (default: coupon.tpl). The template variable $ViisonCoupon can be used to access the coupon information within the template. The variable contains an associative array with the following structure:
integer voucher value in Euro
voucher barcode as SVG, Base64-encoded for use in Data-URL
true if it is a gift voucher generated as an order document
Creation date of the document
If $ViisonCoupon.coupon.isSoldVoucher has the value true, the sequence number of the document can be read from $Document.id.