order

You can access the order object in a theme's Liquid templates with customer.orders.

The order object has the following attributes:

order.billing_address

Returns the billing address of the order.

order.cancelled

Returns true if an order is canceled, or false if it is not.

order.cancelled_at

Returns the timestamp of when an order was canceled. Use the date filter to format the timestamp.

order.cancel_reason

Returns one of the following cancellation reasons, if an order was canceled:

  • items unavailable
  • fraudulent order
  • customer changed/cancelled order
  • other.

order.cancel_reason_label

Returns the translated output of an order's order.cancel_reason.

Input

English: {{ order.cancel_reason }}
French: {{ order.cancel_reason_label }}

Output

English: Items unavailable
French: Produits indisponibles

order.created_at

Returns the timestamp of when an order was created. Use the date filter to format the timestamp.

order.customer

Returns the customer associated with the order.

order.customer_url

Returns the URL of the customer's account page.

Input

{{ order.name | link_to: order.customer_url }}

Output

<a href="http://johns-apparel.myshopify.com/account/orders/d94ec4a1956f423dc4907167c9ef0413">#1235</a>

order.discounts

Returns an array of discounts for an order.

Input

{% for discount in order.discounts %}
  Code: {{ discount.code }}
  Savings: {{ discount.savings | money }}
{% endfor %}

Output

Code: SUMMER16
Savings: -$20.00

order.email

Returns the email address associated with an order.

order.financial_status

Returns the financial status of an order. The possible values are:

  • pending
  • authorized
  • paid
  • partially_paid
  • refunded
  • partially_refunded
  • voided

order.financial_status_label

Returns the translated output of an order's financial_status.

Input

English: {{ order.financial_status }}
French: {{ order.financial_status_label }}

Output

English: Paid
French: Payée

order.fulfillment_status

Returns the fulfillment status of an order.

order.fulfillment_status_label

Returns the translated output of an order's fulfillment_status.

Input

English: {{ order.fulfillment_status }}
French: {{ order.fulfillment_status_label }}

Output

English: Unfulfilled
French: Non confirmée

order.line_items

Returns an array of line items for the order.

order.location

(POS only) Returns the physical location of the order. You can configure locations in the Locations settings of your Shopify admin.

order.name

Returns the name of the order in the format set in the Standards and formats section of the General settings of your Shopify admin.

Input

{{ order.name }}

Output

#1025

order.note

Returns the note associated with a customer order.

Did you know?

To show an order note in an email notification or an Order Printer template, use {{ note }}. To show an order note in a template file like customers/account.liquid, use {{ order.note }}.

Input

Special instructions: {{ order.note }}

Output

Special instructions: Please deliver after 5 PM

order.order_number

Returns the integer representation of the order name.

Input

{{ order.order_number }}

Output

1025

order.shipping_address

Returns the shipping address of the order.

order.shipping_methods

Returns an array of shipping_method variables from the order.

order.shipping_price

Returns the shipping price of an order. Use a money filter to show the result as a monetary amount.

order.subtotal_price

Returns the subtotal price of an order. Use a money filter to show the result as a monetary amount.

order.tax_lines

Returns an array of tax_line variables for an order.

Input

{% for tax_line in order.tax_lines %}
  Tax ({{ tax_line.title }} {{ tax_line.rate | times: 100 }}%): {{ tax_line.price | money }}
{% endfor %}

Output

Tax (GST 14.0%): $25

order.tax_price

Returns the order's tax price. Use a money filter to show the result as a monetary amount.

order.total_price

Returns the total price of an order. Use a money filter to show the result as a monetary amount.

order.transactions

Returns an array of transactions from the order.

Want to discuss this page?

Visit the Shopify Community