INSTANTVOUCHER- tags fill it with the data of the purchased voucher.
All seven tags apply exclusively in this template. You specify which template it is in the shop configuration shop.config in the <Templates> section with the InstantVoucherPDF parameter. Outside this template, the tags remain empty because the voucher data is not available there.
The tags always describe exactly one voucher, namely the one just created. If a customer orders several, a separate PDF is created for each from the same template.
Guide: Printable purchase vouchers · Reference: Templates section
The values of the voucher
INSTANTVOUCHER-Amount is already formatted in the shop’s price format, that is, with the configured decimal and thousands separators. You don’t need to reformat anything, and you also cannot call the tag with a different number of digits.Currency code and currency symbol are two different tags because both have their place. The symbol reads more naturally next to the amount, while the code is unambiguous and suits the footer or vouchers going abroad.
Outputting the validity
The three date components are separate tags so that you can assemble the date in the notation of the respective country.Check the year for this. The shop system only outputs the day if it is between 1 and 31, the month only between 1 and 12, and the year only from 2015 onward. If the date is missing, all three are empty. The year is the most meaningful of the three, because a valid date always has one.
Checking for a specific value
Each of the seven tags can be used as an area tag with a comparison value in the argument. The area then takes effect if the value matches exactly.The capitalization of the comparison value doesn’t matter. This option is not described in the previous documentation, but it works with all tags on this page.
The tags at a glance
All seven tags behave the same. They only apply in the template entered under
InstantVoucherPDF. The capitalization of the tag name doesn’t matter.
Related topics
- Guide: Printable purchase vouchers
- Reference: VOUCHER- (Vouchers)
- Reference: Templates section
