Defining Transactional Variables

When running an online store, there is a constant need to send transactional email messages. As a store owner you use them for invoicing, welcoming new accounts, account changes, and even alerts. Magento Go has a set of predefined templates which can be used as the basis for sending a wide variety of transactional email messages.

Your Magento Go store has default transactional email template already set up and configured for you. These can be found in your store's Administrative panel.

To learn more, read Customizing Transactional Emails.

Transactional Email templates can be completely customized. They are composed of two elements: HTML /Plain Text and System/Custom Variables. HTML templates are sent to customers in HTML format. Alternatively, you can send email in plain text, without web formatting.

Variables

System variables are placeholders in your templates which are replaced by dynamic content. In other words, the variable {{var order.increment_id}} is interpreted by Magento Go as the Order ID of the order for which the email is generated.

What's more, you can create your own variables for use in transactional email and CMS content blocks. Custom variables allow you to use pieces of information in multiple places, such as multiple email templates or content blocks, with the benefit of being able to maintain the information in one place: System > Custom Variables. Learn more by reading Creating Custom Variables.

System Variables

The Magento Go platform provides a wide assortment of system variables that you can incorporate in your transactional Email templates. Some are global variables that can be used in any transactional email, and others are specific to certain transactions.

The tables below list the system variables that you can use in your custom transactional email templates.

Variables that can be used in any transactional email

VariableDescription
{{store url=""}}Store website address.
{{var logo_url}}URL of store logo
{{var logo_alt}}Alternative text for store logo if image is unavailable.
{{var store.getFrontendName()}}Store name (as defined in system configurations)
{{var store url="customer/account/"}}Web address of customer accounts page.
{{config path='trans_email/ident_support/email'}}Support email address (as defined in store configuration)
{{config path='general/store_information/phone'}}Store phone number (as defined in store configuration)
{{config path="general/store_information/address"}}Store address (as defined in store configuration)
{{store url="adminhtml/system_account"}} Link address for admin login page.

New Order (and New Order for Guest)

VariableDescription
{{htmlescape var=$order.getCustomerName()}}* For New Order only, Name of customer as defined in Customer Information for order
{{var order.increment_id}}Order identification number.
{{var order.getCreatedAtFormated('long')}}Date and time this current order was created
{{var order.getBillingAddress().format('html')}}Complete billing address for HTML emails
{{var payment_html}}Payment method (formatted for HTML emails)
{{var order.getShippingAddress{}.format('html')}}Complete shipping address for HTML emails
{{var order.getShippingDescription()}}Shipping method for order
{{layout handle="sales_email_order_items" order=$order}}Displays line items, SKU number, qty, subtotal, and total order information.
{{htmlescape var=$order.getBillingAddress().getName()}}* For New Order for Guest only, Name of customer as defined in Billing address for the order

New Invoice (and New Invoice for Guest)

VariableDescription
{{htmlescape var=$order.getCustomerName()}}*For New Invoice only, Name of customer as defined in Customer Information for order
{{var invoice.increment_id}}Invoice identification number
{{var order.increment_id}}Order identification number
{{var order.billing_address.format('html')}}Billing address as per order information (in HTML format)
{{var payment_html}}Payment method formatted for HTML emails.
{{var order.shipping_address.format('html')}}Complete billing address formatted for HTML emails
{{var order.shipping_description}}Shipping method for order
{{var comment}}Comments that have been noted with the invoice. Only shown when you checkmark the checkbox “Email copy of invoice" and checkmark "Append comments".
{{htmlescape var=$billing.getName()}}* For New Invoice for Guest only, Customer name as defined in billing information for order.

New Shipment (and New Shipment for Guest)

VariableDescription
{{var shipment.increment_id}}Shipment identification number.
{{var order.increment_id}}Order identification number.
{{var shipment.increment_id}}Shipment identification number.
{{var order.billing_address.format('html')}}Complete billing address formatted for HTML emails
{{var payment_html}}Payment method formatted for HTML emails.
{{var order.shipping_address.format('html')}}Complete shipping address formatted for HTML emails.
{{var order.shipping_description}}Shipping method.
{{htmlescape var=$billing.getName()}}* For New Shipment For Guest only, Customer name as defined in billing information for order.
{{var comment}}Comments that have been noted with the shipment. Only shown when you checkmark the checkbox “Email copy of invoice" and checkmark “Append comments".

New Credit Memo (and New Credit Memo for Guest)

VariableDescription
{{htmlescape var=$order.getCustomerName()}}* For New Credit Memo only, Customer name (as per order information)
{{var order.increment_id}}Order identification number
{{var order.getStatusLabel()}}Current status of the order.
{{var comment}}Comments (if any) that were left with the credit memo. Displayed when checkboxes "Email copy of credit memo" and "Append comments" are checkmarked.
{{htmlescape var=$billing.getName()}}* For New Credit Memo For Guest only, Customer name as defined in billing information for order.

Order Update (and Order Update for Guest)

VariableDescription
{{htmlescape var=$order.getCustomerName()}}* For Order Update only, Customer name (as per order information).
{{var order.increment_id}}Order identification number
{{var order.getStatusLabel()}}Current status of the order.
{{htmlescape var=$billing.getName()}}* For Order Update for Guest only, Customer name as defined in billing information for order.

Shipment Update (and Shipment Update for Guest)

VariableDescription
{{htmlescape var=$order.getCustomerName()}}* For Shipment Update only, Customer name (as per order information)
{{htmlescape var=$billing.getname()}}* For Order Update for Guest only, Customer name as defined in billing information for order
{{var order.increment_id}}Order identification number
{{var order.getStatusLabel()}}Current status of the order

Store Credit Update

VariableDescription
{{var name|escape}}Name of the customer whose credit has been updated.
{{var balance}}Store credit balance.

Contact Form

Gift Card Account Sent from Edit Page

VariableDescription
{{var data.name}}Name (from the name field in the contact form)
{{var data.email}}Email Address (email field in contact form)
{{var data.telephone}}Phone Number (phone number field in contact form)
{{var data.comment}}Comments (comment text box in contact form)
VariableDescription
{{var name|escape}}The name on the gift card.
{{var code|escape}}The gift card code. This code is typed in at checkout to use the balance on the gift card for an order.
{{var balance}}The balance on the gift card.

Gift Card Account Sent from Gift Card

VariableDescription
{{var name|escape}}The name on the gift card.
{{var code|escape}}The gift card code. This code is typed in at checkout to use the balance on the gift card for an order.
{{var balance}}The balance on the gift card.
{{var store.getFrontendName()}}Store name
{{var sender_name_with_email|escape}}Name and email address of the gift card sender.
{{var giftcards}}Gift card code(s) -- can be more than one.
{{var gift_message|escape|n12br}}Message from the sender included with gift card(s).

Send Product to a Friend

VariableDescription
{{var name}}Name inputted in "send product to a friend" form
{{var product_url}}Link address of the product
{{var product_name}}Name of the product being sent
{{var message}}Message included in "send product to a friend" form

Share Wishlist

VariableDescription
{{var customer.name}}Name of customer sharing the wishlist.
{{var message}}Message included by customer when sharing wishlist. (In wishlist sharing form)
{{var items}}Items in the wishlist.
{{var viewOnSiteLink}}Link to view wishlist directly on website.

Newsletter Subscription Confirmation

New Account

VariableDescription
var subscriber.getConfirmationLink()}}Newsletter subscription confirmation link. User must click this link to confirm their subscription.
VariableDescription
{{var customer.name}}Name of customer
{{var customer.email}}Email address / login for the customer account.
{{htmlescape var=$customer.password}}Password for new customer account.

New Account Confirmation

VariableDescription
{{var customer.name}}Name of customer
{{var customer.email}}Email address / login for the customer account.
{{htmlescape var=$customer.password}}Password for new customer account.
{{store url="customer/account/confirm/" _query_id=$customer.id _query_key=$customer.confirmation _query_back_url=$back_url}}Account confirmation key -- link address that customer must click to activate their account.

New Account Confirmed

VariableDescription
{{var customer.name}}Name of customer
{{var customer.email}}Email address / login for the customer account.
{{htmlescape var=$customer.password}}Password for new customer account.

New Administrative Password

VariableDescription
{{htmlescape var=$user.name}}Name of administrator.
{{htmlescape var=$password}}Password of administrator.
{{var user.name}}Administrative user name.

New Password

VariableDescription
{{htmlescape var=$customer.name}}Name of customer.
{{htmlescape var=$customer.password}}Password of customer.

Task Notification

Payment Failed

VariableDescription
{{var message}}Message/content of a new task. (i.e. Import customers task, Refresh search index task)
VariableDescription
{{var reason}}Reason for payment failure.
{{var checkoutType}}Checkout type.
{{var customer}}Customer name
{{var customerEmail}}Customer e-mail address
{{var items}}Line items in the shopping cart order.
{{var total}}Total order amount.
{{var billingAddress.format('html')}}Complete billing address for HTML emails
{{var shippingAddress.format('html')}}Complete shipping address for HTML emails
{{var shippingMethod}}Shipping method
{{var paymentMethod}}Payment method
{{var dateAndTime}}Date and time order was made.

Product Alerts Cron Error

VariableDescription
{{var warnings}}Warnings generated by cron for product alerts.

Product Price Change Alert & Product Stock Alert

VariableDescription
{{var customerName}}Customer name.
{{var alertGrid}}Grid of product alerts.

Discussion:

RSS: New Article posts

Explore the Knowledge Base