The order object

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

The order object has the following attributes:

order.attributes

Returns the custom cart attributes for the order, if there are any. You can add as many custom attributes to your cart as you like.

When you're looping through attributes, use {{ attribute | first }} to get the name of the attribute, and {{ attribute | last }} to get its value.

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.