Liquid variables reference
The Liquid variables available in email and order note templates.
Both the email notification and order notes templates accept Liquid variables. The app includes this list in each editor, so you can check a variable name without leaving the page.
General
Order-level values.
| Variable | Contains |
|---|---|
{{ shop.name }} | Your shop's name |
{{ order_number }} | The order number, without a prefix |
{{ order_name }} | The order name, including the # |
{{ subtotal_price | money }} | Subtotal, formatted as money |
{{ tax_price | money }} | Total tax |
{{ total_price | money }} | Order total |
Shop details
| Variable | Contains |
|---|---|
{{ shop.name }} | Your shop's name |
{{ shop.admin_email }} | Your shop's email address |
{{ shop.admin_name }} | The shop owner's name |
Customer details
| Variable | Contains |
|---|---|
{{ customer_first_name }} | First name |
{{ customer_last_name }} | Last name |
{{ customer_name }} | Full name |
{{ customer_email }} | Email address |
{{ customer_phone }} | Phone number |
Line item details
Line items require a loop. Everything inside the loop uses line.
{% for line in line_items %} {{ line.title }} × {{ line.quantity }} {% for p in line.properties %} {{ p.first }}: {{ p.last }} {% endfor %}{% endfor %}| Variable | Contains |
|---|---|
{{ line.name }} | The item's name |
{{ line.title }} | The product title |
{{ line.variant_title }} | The variant title |
{{ line.quantity }} | How many |
{{ line.original_line_price | money }} | Price before discounts |
{{ line.final_line_price | money }} | Price after discounts |
{{ line.total_discount | money }} | Discount applied |
{{ line.grams }} | Weight |
{{ line.sku }} | SKU |
{{ line.vendor }} | Vendor |
{{ line.image | img_url }} | The item's image |
The properties loop
line.properties contains the options. Each entry has a name and a value.
| Inside the loop | Contains |
|---|---|
{{ p.first }} | The option's Name — which is why Name matters |
{{ p.last }} | What the customer entered or chose |
This pattern skips those properties and handles uploaded files:
{% for p in line.properties %} {% assign first_char = p.first | truncate: 1, '' %} {% unless p.last == blank or first_char == '_' %} {{ p.first }}: {%- if p.last contains '/uploads/' -%} <a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a> {%- else -%} {{ p.last }} {%- endif -%} {% endunless %}{% endfor %}It skips internal properties and empty values, and it displays an uploaded file as a link with a readable name rather than a long address.
A complete order note template
{% for line in line_items %}{{ line.title }} × {{ line.quantity }}{% for p in line.properties %}{% assign fc = p.first | truncate: 1, '' %}{% unless p.last == blank or fc == '_' %}- {{ p.first }}: {{ p.last }}{% endunless %}{% endfor %}{% endfor %}Keep the template compact, because order notes are displayed and printed in a small area.
Notes
- The variable list in the app is the current one, and it is available in both editors.
- Money values need the
moneyfilter to be formatted. Without it, the template prints a raw number. - Both templates have a Revert to default action.
- Order notes are often printed as plain text, so keep HTML formatting to a minimum there. Emails can include more.
Was this helpful?
Thanks for your feedback! Tell us what was missing
Report an issue