> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firmhouse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Order details template

> Reference for customizing an individual Customer Portal order page with order.liquid.

`order.liquid` controls the complete page for an individual customer-visible order. The Firmhouse default template includes the page heading, status, ordered products, price breakdown, and shipping address. Replace any of its markup to match your storefront.

Common tags are documented on [Common tags](./common): `{% legacy_navbar %}`.

## Page context

The template receives these page-specific variables:

| Variable      | Description                                                                              |
| ------------- | ---------------------------------------------------------------------------------------- |
| `order`       | The current [order Liquid object](https://developer.firmhouse.com/liquid/objects#order). |
| `orders_url`  | URL of the orders overview for the current subscription and locale.                      |
| `page_title`  | Localized title containing the order number.                                             |
| `page_byline` | Localized ordered, scheduled, or shipped date summary for the order.                     |

Orders with the `awaiting_confirmation` status cannot be opened from the Customer Portal.

## Build an order details page

Use `order.order_lines` for the purchased products and the amount fields on `order` for the price summary:

```liquid theme={null}
<h1>{{ page_title | escape }}</h1>
<p>{{ page_byline | escape }}</p>
<p>{{ order.status_translated | escape }}</p>

{% for order_line in order.order_lines %}
  <p>
    {{ order_line.quantity | escape }} × {{ order_line.product_title | escape }}
    {{ order_line.total_amount_excluding_tax | escape }}
  </p>
{% endfor %}

{% if order.amount_cents > 0 %}
  <p>{{ "orders.subtotal" | t | escape }}: {{ order.subtotal_excl_tax | escape }}</p>
  <p>{{ "orders.tax" | t | escape }}: {{ order.total_tax | escape }}</p>
  {% if order.shipping_costs_excl_tax_cents > 0 %}
    <p>{{ "orders.shipping" | t | escape }}: {{ order.shipping_costs_excl_tax | escape }}</p>
  {% endif %}
  <p>{{ "orders.total" | t | escape }}: {{ order.amount | escape }}</p>
{% endif %}
```

Product snapshot fields such as `order_line.product_title` remain available when the original product has been removed. Guard access to `order_line.product` when you use live product fields.

## Show the shipping address

`order.shipping_address_lines` contains the formatted address as an array so each line can be styled independently:

```liquid theme={null}
<h2>{{ "orders.shipped_to" | t | escape }}</h2>
<p>{{ order.full_name | escape }}</p>

{% for address_line in order.shipping_address_lines %}
  <p>{{ address_line | escape }}</p>
{% endfor %}
```

Use `orders_url` for a link back to the orders overview. Use `order.invoice.pay_now_url` for a customer-facing link to the finalized invoice related to this order. `order.invoice` is empty when the order has no finalized invoice.
