- Getting Started
- Liquid reference
- Filters reference
- Tags reference
- Localization
- Theme structure
- Theme sections
- Theme assets
- Theme config
- Theme layout
- Theme templates
-
- article.liquid
- blog.liquid
- cart.liquid
- collection.liquid
- customer/account.liquid
- customer/addresses.liquid
- customer/details.liquid
- customer/login.liquid
- customer/order.liquid
- customer/register.liquid
- customer/reset-password.liquid
- home.liquid
- page.no-heading.liquid
- products.liquid
- search.liquid
- list-collections.liquid
- store-locator.liquid
- 404.liquid
- customer/activate_account.liquid
- customer/orders.liquid
- Submission
customers/orders.liquid
The customers/orders.liquid template lists the logged-in customer's past orders. It is loaded when the customer goes to the /account/orders URL.
Loop through the customer.orders array to output each order. Every item is an order object with attributes such as order.name, order.created_at, order.total_price and its status labels. Link each order to its detail page using order.token. More info ›
{% for order in customer.orders %}
<a href="/account/orders/{{ order.token }}">{{ order.name }}</a>
<div>{{ order.created_at | date: "%b %d, %Y" }}</div>
<div>{{ order.total_price | money: order.currency_format }}</div>
{% endfor %}
Order status labels
Each order exposes order.financial_status_label and order.fulfillment_status_label so you can show the payment and delivery state. Compare the label to render a matching status tag.
{% if order.financial_status_label == "Paid" %}
<span class="label-tag label-tag-success">{{ 'customer.financial_status.paid' | t }}</span>
{% elsif order.financial_status_label == "Pending" %}
<span class="label-tag label-tag-pending">{{ 'customer.financial_status.pending' | t }}</span>
{% endif %}
Empty state
When the customer has no orders, customer.orders.size returns 0. Show a placeholder message and a link back to the storefront so the customer can start shopping.
{% if customer.orders.size != 0 %}
<!-- render orders -->
{% else %}
<p>{{ 'customer.orders.empty' | t }}</p>
{% endif %}