Shortcodes are used to inject data from the quote into the email and PDF templates. You can view all available shortcodes by selecting the Short Codes button on any of the template pages
Order
{{order_number}}
{{name}}
-
{{created_at}}
-
{{updated_at}}
-
{{closed_at}}
{{currency}}
{{fulfillment_status}}
{{w3_order_status}}
{{w3_order_status_name}}
{{w3_order_status_description}}
{{w3_order_status_updated}}
{{w3_order_status_updated_by}}
{{w3_public_notes}}
{{w3_private_notes}}
{{w3_due_date}}
{{financial_status}}
{{confirmed}}
{{cancel_reason}}
{{note}}
{{tags}}
{{email}}
{{subtotal_price}}
{{total_discounts}}
{{total_line_items_price}}
{{total_price}}
{{total_tax}}
{{total_weight}}
{{order_status_url}}
-
{{customer}}
-
{{shipping_lines}}
-
{{line_items}}
-
{{billing_address}}
-
{{shipping_address}}
-
{{discount_codes}}
-
{{fulfillments}}
-
{{note_attributes}}
-
{{refunds}}
-
{{history}}
-
{{metafields}}
Customer
{{Customer.email}}
{{Customer.first_name}}
{{Customer.last_name}}
-
{{Customer.metafields}}
Shipping Lines
{% for shipping_line in shipping_lines %}
--- loop through shipping line items here ---
{% endfor %}
{{shipping_line.title}}
{{shipping_line.price}}
{{shipping_line.code}}
{{shipping_line.source}}
Line Items
{% for line_item in line_items %}
--- loop through line items here ---
{% endfor %}
{{line_item.variant_id}}
{{line_item.product_id}}
{{line_item.title}}
{{line_item.variant_title}}
{{line_item.quantity}}
{{line_item.name}}
{{line_item.image}}
{{line_item.sku}}
{{line_item.price}}
{{line_item.grams}}
{{line_item.vendor}}
{{line_item.total_discount}}
{{line_item.gift_card}}
{{line_item.fulfillable_quantity}}
{{line_item.fulfillment_status}}
-
{{line_item.properties}}
Line Item Properties
{% for prop in line_item.properties %}
--- loop through line item properties here ---
{% endfor %}
{{prop.name}}
{{prop.value}}
Shipping Address
{{shipping_address.name}}
{{shipping_address.first_name}}
{{shipping_address.last_name}}
{{shipping_address.company}}
{{shipping_address.phone}}
{{shipping_address.address1}}
{{shipping_address.address2}}
{{shipping_address.city}}
{{shipping_address.province}}
{{shipping_address.province_code}}
{{shipping_address.zip}}
{{shipping_address.country}}
{{shipping_address.country_code}}
{{shipping_address.longitude}}
{{shipping_address.latitude}}
Billing Address
{{billing_address.name}}
{{billing_address.first_name}}
{{billing_address.last_name}}
{{billing_address.company}}
{{billing_address.phone}}
{{billing_address.address1}}
{{billing_address.address2}}
{{billing_address.city}}
{{billing_address.province}}
{{billing_address.province_code}}
{{billing_address.zip}}
{{billing_address.country}}
{{billing_address.country_code}}
{{billing_address.longitude}}
{{billing_address.latitude}}
Discount Codes
{% for discount in discount_codes %}
--- loop through discounts here ---
{% endfor %}
{{discount.amount}}
{{discount.code}}
{{discount.type}}
Fulfillments
{% for fulfillment in fulfillments %}
--- loop through fulfillment here ---
{% endfor %}
{{fulfillment.created_at}}
{{fulfillment.order_id}}
{{fulfillment.status}}
{{fulfillment.tracking_company}}
{{fulfillment.tracking_number}}
{{fulfillment.tracking_url}}
{{fulfillment.updated_at}}
Note Attributes
{% for attribute in note_attributes %}
--- loop through note attributes here ---
{% endfor %}
{{attribute.key}}
{{attribute.value}}
Refunds
{% for refund in refunds %}
--- loop throughrefunds here ---
{% endfor %}
{{refund.id}}
{{refund.restock}}
-
{{refund.refund_line_items}}
Refund Line Items
{% for refund_item in refund_line_items %}
--- loop through refund line items here ---
{% endfor %}
{{refund_item.id}}
{{refund_item.line_item_id}}
{{refund_item.quantity}}
{{refund_item.restock_type}}
{{refund_item.subtotal}}
{{refund_item.total_tax}}
-
{{refund_item.line_item}}
History
{% for history_item in history %}
--- loop through history items here ---
{% endfor %}
{{history_item.status_name}}
{{history_item.status_name_public}}
{{history_item.status_changed}}
{{history_item.customer_emails_sent}}
{{history_item.customer_emails}}
{{history_item.additional_emails_sent}}
{{history_item.additional_emails}}
{{history_item.due_date}}
Metafields
{% for metafield in metafields %}
--- loop through meta fields here ---
{% endfor %}
{{metafield.namespace}}
{{metafield.key}}
{{metafield.value}}
{{metafield.type}}
{{metafield.file_url}}
If the meta field type is "file," this property will return the URL to the file.
Some of the metafield values returned by Shopify are JSON strings. For these values, you can use the "to_object" filter to convert the strings into objects to display selected values easily. For example, the "money" metafield type returns values like this.
{ "amount": "5.99", "currency_code": "CAD" }
Using the "to_object" filter, you can display the "amount" using the following code.
{{metafield.value | to_object: "amount" }}