The customers/order.liquid template displays the details of a visitor's past order.

Template Considerations

The order variable

Inside the order.liquid template, you have access to all the attributes of the order variable. Use the order variable to output information from the order.

For example, to output the Billing Address, you can access the attributes of the order variable's billing_address attribute, which contains the attributes of the address variable.

<h2>Billing Address</h2>
<p><span>Payment Status:</span> <span class="status_{{ order.financial_status }}">{{ order.financial_status }}</span></p>
<p>{{ }}</p>
<p>{{ }}</p>
<p>{{ order.billing_address.street }}</p>
<p>{{ }}, {{ order.billing_address.province }}</p>
<p>{{ }} {{ }}</p>
<p>{{ }}</p>

Shown below is another example, this time outputting the Shipping Address.

<h2>Shipping Address</h2>
<p><span>Fulfillment Status:</span><span class="status_{{ order.fulfillment_status }}">{{ order.fulfillment_status }}</span></p>
<p>{{ }}</p>
<p>{{ }}</p>
<p>{{ order.shipping_address.street }}</p>
<p>{{ }}, {{ order.shipping_address.province }}</p>
<p>{{ }} {{ }}</p>
<p>{{ }}</p>

To output what products were purchased in the order, loop through the order variable's line_item array.

  {% for line_item in order.line_items %}
    <td>{{ line_item.title | link_to: line_item.product.url }}</td>
    <td>{{ line_item.sku }}</td>
    <td>{{ line_item.original_price | money }}</td>
    <td>{{ line_item.quantity }}</td>
    <td>{{ line_item.line_price | money }}</td>
  {% endfor %}