customer-order
The customer-order template renders one order of the logged in customer.
Location
The customer-order template is located in the templates directory of the theme.
bash
└── theme
├── layout
├── templates
│ ...
│ ├── customer-order.json
│ ...
...Usage
It renders at /account/orders/{id}, the customer_url of the order. You get the order object. Without this template the page redirects to /account/orders. An order of another customer returns a 404.
liquid
<h1>{{ order.name }}</h1>
<p>{{ order.financial_status }} · {{ order.fulfillment_status }}</p>
{% for variant in order.order_variants %}
<!-- line item: variant.name, variant.quantity, variant.price -->
{% endfor %}
{% if order.shipping_address %}
<p>{{ order.shipping_address.address1 }}, {{ order.shipping_address.city }}</p>
{% endif %}
<span>{{ order.total | money }}</span>