Added by andrey.demyaniv, last edited by Pavel Yakimovich on May 14, 2010  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

The order email template supports big amount of tokens.

1. Order general tokens

[%$order.orders_id%] - Order ID
[%$order.imported_orders_id%] - If order imported, containt imported order ID
[%$order.administrators_id%] - Administrator ID who create this order (only if order created from admin tool)
[%$order.delivery_time%] - Delivery time for order
[%$order.customers_id%] - Customer ID
[%$order.delivery_address%] - Formatted delivery address
[%$order.invoice_address%] - Formatted invoice address

Delivery and invoice addresses containt country address format. Information about it can be found at Tokens - Country Address Format

2. Address and customer specific tokens

[%$order.<address_type>_name%] - Name of the address
[%$order.<address_type>_street_address%] - Street
[%$order.<address_type>_house_number%] - House number
[%$order.<address_type>_postcode%] - Postal code
[%$order.<address_type>_city%] - City
[%$order.<address_type>_state%] - State
[%$order.<address_type>_country%] - Country
[%$order.<address_type>_gender%] - Gender (can be 'm' or 'f')
[%$order.<address_type>_firstname%] - First name
[%$order.<address_type>_prefix%] - Name prefix
[%$order.<address_type>_lastname%] - Last name
[%$order.<address_type>_email_address%] - Email address
[%$order.<address_type>_telephone%] - Phone number
[%$order.<address_type>_fax%] - Fax number
[%$order.<address_type>_mobile%] - Mobile number
[%$order.<address_type>_work%] - Work phone number
[%$order.<address_type>_company%] - Company name
[%$order.<address_type>_department%] - Department
[%$order.<address_type>_web_site%] - Web site
[%$order.<address_type>_vat%] - VAT number
[%$order.<address_type>_coc%] - COC number

Possible values of <address_type> are:

customers - for generic customer details
shipping - for order shipping address details
invoice - for order invoice address details

Some examples:

 [%$order.customers_telephone%]
 [%$order.shipping_city%]
 [%$order.invoice_house_number%]

3. Products tokens

[%$products.<ID>.line_status_id%] - Status ID for this product
[%$products.<ID>.line_date%] - Date when current product was ordered
[%$products.<ID>.comments%] - Customers comment for this product
[%$products.<ID>.orders_products_id%] - ID
[%$products.<ID>.orders_id%] - Order ID
[%$products.<ID>.orders_status_id%] - Status ID for current order
[%$products.<ID>.products_weight%] - Weight for current product
[%$products.<ID>.products_model%] - Model of the product
[%$products.<ID>.products_name%] - Name of the product
[%$products.<ID>.products_short_description%] - Short description of the product
[%$products.<ID>.products_gtin%] - EAN code of the product
[%$products.<ID>.products_sku%] - Product SKU
[%$products.<ID>.products_mpn%] - Manufacturer part number
[%$products.<ID>.products_dpn%] - Distributor part number
[%$products.<ID>.tax%] - Tax amount
[%$products.<ID>.products_quantity%] - Ordered quantity
[%$products.<ID>.brand_name%] - Brand of the product
[%$products.<ID>.brand_id%] - ID of brand of the product
[%$products.<ID>.manufacturer_name%] - Manafacturer 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<.distributors_name%] - Name of the distributor supplying the product
[%$products.<ID>.stock_locations_code%] - Code of the distributor's stock supplying the product
[%$products.<ID>.stock_locations_id%] - ID of the distributor's stock supplying the product
[%$products.<ID>.categories_id%] - ID of the product category
[%$products.<ID>.category_name%] - Name of the product category
[%$products.<ID>.purchase_price%] - Purchase price of product
[%$products.<ID>.sales_price%] - Sales price of product
[%$products.<ID>.price%] - Price of product excluding the taxes
[%$products.<ID>.tax%] - Tax for a single product
[%$products.<ID>.tax_percentage%] - Tax percentage
[%$products.<ID>.purchase_price%] - Purchase price of the product
[%$products.<ID>.subtotal_excl_tax%] - Subtotal excluding taxes for this product
[%$products.<ID>.subtotal_incl_tax%] - Subtotal including taxes for this product
[%$products.<ID>.product_vat_absolute] - Absolute VAT value for this product
[%$products.<ID>.product_vat_percentage] - Percentage VAT value for this product

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%]

4. Order totals array

[%$order.totals.<code>.title%] - Title of the 'total'
[%$order.totals.<code>.text%] - Formatted value
[%$order.totals.<code>.code%] - Code of the 'total'
[%$order.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=$order.totals item=total%]
 [%$total.title%] = [%$total.text%]
[%/foreach%]