Skip to content
This repository was archived by the owner on Aug 30, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 36 additions & 29 deletions templates/customers/account.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,45 @@
{% comment %}
If we have past orders, loop through each one
{% endcomment %}
{% if customer.orders.size != 0 %}

<div class="table-wrap">
<table class="full">
<thead>
<tr>
<th>{{ 'customer.orders.order_number' | t }}</th>
<th>{{ 'customer.orders.date' | t }}</th>
<th>{{ 'customer.orders.payment_status' | t }}</th>
<th>{{ 'customer.orders.fulfillment_status' | t }}</th>
<th>{{ 'customer.orders.total' | t }}</th>
</tr>
</thead>
<tbody>
{% for order in customer.orders %}
{% paginate customer.orders by 20 %}
{% if customer.orders.size != 0 %}

<div class="table-wrap">
<table class="full">
<thead>
<tr>
<td>{{ order.name | link_to: order.customer_url }}</td>
<td>{{ order.created_at | date: format: 'month_day_year' }}</td>
<td>{{ order.financial_status_label }}</td>
<td>{{ order.fulfillment_status_label }}</td>
<td>{{ order.total_price | money }}</td>
<th>{{ 'customer.orders.order_number' | t }}</th>
<th>{{ 'customer.orders.date' | t }}</th>
<th>{{ 'customer.orders.payment_status' | t }}</th>
<th>{{ 'customer.orders.fulfillment_status' | t }}</th>
<th>{{ 'customer.orders.total' | t }}</th>
</tr>
{% endfor %}
</tbody>
</table>
</div>

{% else %}

<p>{{ 'customer.orders.none' | t }}</p>
</thead>
<tbody>
{% for order in customer.orders %}
<tr>
<td>{{ order.name | link_to: order.customer_url }}</td>
<td>{{ order.created_at | date: format: 'month_day_year' }}</td>
<td>{{ order.financial_status_label }}</td>
<td>{{ order.fulfillment_status_label }}</td>
<td>{{ order.total_price | money }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

{% else %}

<p>{{ 'customer.orders.none' | t }}</p>

{% endif %}
{% endif %}
{% if paginate.pages > 1 %}
<div class="text-center">
{% include 'pagination-custom' %}
</div>
{% endif %}
{% endpaginate %}
</div>

<div class="grid__item one-third medium-down--one-whole">
Expand Down