Template Marker

Here is a collection of marker that can be used in email templates, cms pages and static blocks.

Get system configuration fields

{{config path="web/unsecure/base_url"}}

Customer data

{{var customer}} -> print all customer data

{{var customer.ID}}

{{var customer.email}}

{{var customer.firstname}}

{{var customer.lastname}}

{{var customer.name}}

{{var customer.password}}

{{var customer.created_in}} -> store name where customer was created in

{{var customer.dob}} -> customers date of birth

{{var customer.password_hash}}

{{var customer.prefix}}

{{var customer.middlename}}

{{var customer.suffix}}

{{var customer.group_id}}

{{var customer.taxvat}}

{{var customer.store.name}} -> storeview name customer is associated to

{{var customer.store.group.name}} -> website name customer is associated to


{{depend order.getIsNotVirtual()}}
// only happens if order is not virtual

{{depend salable}}
// only happens if data field saleable is set

{{if order.getIsNotVirtual()}}
// only happens if order is not virtual
// only happens if order is  virtual
{{/if}}(else is optional)


{{block type='core/template' area='frontend' template='path/to/template.phtml' variable=$datafield variable2=$datafield2}}

{{block id='block_id'}} -> reference to a block in a block / cms page already defined (f.e. in layout file)

Trigger a layout handle

{{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}

{{layout handle="sales_email_order_items" order=$order}}

{{layout handle="sales_email_order_creditmemo_items" creditmemo=$creditmemo order=$order}}

{{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}}

Order / shipping data

{{var order.getShippingAddress().format('html')}}

{{var order.getShippingAddress().getName()}} -> get first- and lastname

{{var order.getShippingAddress().getPrefix()

{{var order.getShippingAddress().getFirstName()}}

{{var order.getShippingAddress().getMiddleName()}}

{{var order.getShippingAddress().getLastName()}}

{{var order.getShippingAddress().getSuffix()}}

{{var order.getShippingAddress().getStreet1()}}

{{var order.getShippingAddress().getStreet2()}}

{{var order.getShippingAddress().getCity()}}

{{var order.getShippingAddress().getRegion()}}

{{var order.getShippingAddress().getPostcode()}}

{{var order.getShippingAddress().getCountry()}} -> get the country ID

{{var order.getShippingAddress().getCountryModel().getName()}} -> get the countries full name

{{var order.getShippingAddress().getRegion()}}

{{var order.getShippingAddress().getTelephone()}}

{{var order.customer_email}}

{{var order.getBillingAddress().format('html')}} 

{{var order.getCreatedAtFormated('long')}} 

{{var order.getCustomerName()}} 

{{var order.getCustomerFirstname()}} 

{{var order.getCustomerLastname()}} 

{{var order.getEmailCustomerNote()}} 

{{var order.getShippingDescription()}} 

{{var order.getStatusLabel()}} 

{{var order.getStoreGroupName()}} -> website the order was created on

{{var order.id}} 

{{var order.increment_id}}


{{skin url="'}}

{{store url=""}}

{{store direct_url=''}}

{{media url=''}} 

{{skin url=''}}

Further marker

{{var addAllLink}}

{{var alertGrid}}

{{var billingAddress.format('html')}}

{{var checkoutType}}

{{var comment}}

{{var creditmemo.id}}

{{var creditmemo.increment_id}}

{{var data.comment}}

{{var data.email}}

{{var data.name}}

{{var data.telephone}}

{{var dateAndTime}}

{{var invoice.id}}

{{var invoice.increment_id}}

{{var invoice.created_at}}

{{var items}}

{{var items_html}}

{{var message}}

{{var name}}

{{var password}}

{{var payment_html}}

{{var paymentMethod}}

{{var product_name}}

{{var product_url}}

{{var reason}} -> f.e: the reason for payment failure in failure mail

{{var shipment.increment_id}}

{{var shippingMethod}}

{{var total}}

{{var user.name}}

{{var viewOnSiteLink}}

{{var warnings}}

{{var billing.name}}

{{protocol store='' http='' https=''}}

{{htmlescape var='' allowed_tags=''}}

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.