The invoice PDF template supports big amount of tokens.
1. Invoice general tokens
[%$invoice.customers_id%] - ID of the customer, to whom invoice is sent [%$invoice.orders_id%] - ID of the order, upon which invoice is sent [%$invoice.reference%] - Reference of the order, upon which invoice is sent [%$invoice.id%] - ID of the invoice itself [%$invoice.date%] - Date, when the invoice was created [%$invoice.xtra_customers_id%] - ID of the customer in the external system
2. Order general tokens
[%$order.info.id%] - ID of the order [%$order.info.reference%] - Reference of the order [%$order.info.date%] - Date, when the order was created [%$order.info.payment_module_title%] - Title of the payment module [%$order.info.payment_method_title%] - Title of the payment method [%$order.info.shipping_module_title%] - Title of the shipping module [%$order.info.shipping_method_title%] - Title of the shipping method
3. Address and customer specific tokens
[%$<address_type>.name%] - Name of the address [%$<address_type>.street%] - Street [%$<address_type>.house_number%] - House number [%$<address_type>.postcode%] - Postal code [%$<address_type>.city%] - City [%$<address_type>.state%] - State [%$<address_type>.country%] - Country [%$<address_type>.gender%] - Gender (can be 'm' or 'f') [%$<address_type>.firstname%] - First name [%$<address_type>.prefix%] - Name prefix [%$<address_type>.lastname%] - Last name [%$<address_type>.email%] - Email address [%$<address_type>.telephone%] - Phone number [%$<address_type>.fax%] - Fax number [%$<address_type>.mobile%] - Mobile number [%$<address_type>.work%] - Work phone number [%$<address_type>.company%] - Company name [%$<address_type>.department%] - Department [%$<address_type>.web_site%] - Web site [%$<address_type>.vat%] - VAT number [%$<address_type>.coc%] - COC number
Possible values of <address_type> are:
- general_address - for generic customer details
- shipping_address - for order shipping address details
- invoice_address - for order invoice address details
Some examples:
[%$general_address.telephone%] [%$shipping_address.city%] [%$invoice_address.house_number%]
4. Products tokens
[%$products.<ID>.name%] - Name of the product [%$products.<ID>.gtin%] - EAN code of the product [%$products.<ID>.sku%] - Product SKU [%$products.<ID>.mpn%] - Manufacturer part number [%$products.<ID>.dpn%] - Distributor part number [%$products.<ID>.tax%] - Tax amount [%$products.<ID>.qty%] - Ordered quantity [%$products.<ID>.min_unit_per_pack%] - Minimum units per pack [%$products.<ID>.brand_name%] - Brand of the product [%$products.<ID>.brand_id%] - ID of brand of the product [%$products.<ID>.short_description%] - Short description of the product [%$products.<ID>.distributors_code%] - Code of the distributor supplying the product [%$products.<ID>.category_name%] - Name of the product category [%$products.<ID>.price_incl_tax%] - Price of product including the taxes [%$products.<ID>.price%] - Price of product excluding the taxes [%$products.<ID>.taxes.tax_vat.value|number_format:2%] - Tax for a single product [%$products.<ID>.taxes.tax_vat.tax_level|number_format:2%] - Tax percentage [%$products.<ID>.purchase_price%] - Purchase price of the product [%$products.<ID>.subtotal%] - Subtotal excluding taxes for this product [%$products.<ID>.subtotal_tax%] - Tax for the whole order line [%$products.<ID>.subtotal_incl_tax%] - Subtotal including taxes for this product [%$products.<ID>.dateOrdered%] - Date when current product was ordered
As $products is an array, <ID> value is never known, and one should use these tokens in array like:
[%foreach from=$products item=product%] [%$product.name%] [%/foreach%]
5. Order totals array
[%$totals.<code>.title%] - Title of the 'total' [%$totals.<code>.text%] - Formatted value [%$totals.<code>.code%] - Code of the 'total' [%$totals.<code>.value%] - Not formatted value
As $totals is an array, <code> value is never known, and one should use these tokens in array like:
[%foreach from=$totals item=total%] [%$total.title%] = [%$total.text%] [%/foreach%]