Order The order object for confirmation pages, email templates, and customer account history.
The order object represents a completed purchase. It is available on the order confirmation page, in email notification templates, and inside customer.orders when a customer is logged in.
< h1 >Order {{ order .name }}</ h1 >
< p >Placed on {{ order .created_at | date: '%d %B %Y' }}</ p >
Property Type Description order.idstring The unique order ID order.namestring The display name (e.g. #1042) order.emailstring The email address on the order order.created_atdate When the order was placed order.cancelledboolean Whether the order has been cancelled order.cancelled_atdate When it was cancelled (nil if not cancelled) order.cancel_reasonstring The reason given for cancellation
Property Type Description order.total_pricenumber The final total including tax and shipping order.subtotal_pricenumber Total before tax and shipping order.total_taxnumber Total tax amount order.total_discountsnumber Total discount amount order.shipping_pricenumber Shipping cost order.currencystring Three-letter currency code
All prices are in the smallest currency unit. Use the money filter to display them:
< p >Subtotal: {{ order .subtotal_price | money }}</ p >
< p >Shipping: {{ order .shipping_price | money }}</ p >
< p >Tax: {{ order .total_tax | money }}</ p >
< p >Total: {{ order .total_price | money }}</ p >
The order.line_items array contains every product in the order:
Property Type Description item.titlestring Product title item.variant_titlestring Variant title (e.g. "Large / Black") item.skustring SKU code item.quantitynumber Number of units ordered item.pricenumber Unit price item.line_pricenumber Price times quantity item.imageimage Product image item.urlstring Link to the product page
{% for item in order .line_items %}
< div class = "order-item" >
{% if item. image %}
< img src = "{{ item . image | img_url: '100x100' }}" alt = "{{ item . title }}" />
{% endif %}
< div >
< p >{{ item.title }}</ p >
{% if item.variant_title %}
< p class = "variant" >{{ item.variant_title }}</ p >
{% endif %}
< p >{{ item.quantity }} x {{ item.price | money }}</ p >
</ div >
</ div >
{% endfor %}
Property Type Description order.shipping_addressaddress Where the order is being shipped order.billing_addressaddress The billing address
Each address has the same fields as the customer address object: first_name, last_name, address1, address2, city, province, zip, country, and phone.
< h3 >Ship to</ h3 >
< p >
{{ order .shipping_address.first_name }} {{ order .shipping_address.last_name }}< br />
{{ order .shipping_address.address1 }}< br />
{{ order .shipping_address.city }}, {{ order .shipping_address.zip }}< br />
{{ order .shipping_address.country }}
</ p >
Property Type Description order.fulfillment_statusstring Current status: unfulfilled, partial, fulfilled order.financial_statusstring Payment status: pending, paid, refunded, partially_refunded
{% case order .fulfillment_status %}
{% when 'fulfilled' %}
< span class = "badge badge--success" >Shipped</ span >
{% when 'partial' %}
< span class = "badge badge--warning" >Partially Shipped</ span >
{% else %}
< span class = "badge" >Processing</ span >
{% endcase %}
Property Type Description order.discount_codesarray Discount codes applied to the order
{% for discount in order .discount_codes %}
< p >Discount: {{ discount.code }} ({{ discount.amount | money }} off)</ p >
{% endfor %}
Property Type Description order.notestring Customer note left at checkout
{% if order .note != blank %}
< div class = "order-note" >
< h4 >Customer Note</ h4 >
< p >{{ order .note }}</ p >
</ div >
{% endif %}