Skip to content

Instantly share code, notes, and snippets.

@rjfrizz
Last active September 26, 2017 18:51
Show Gist options
  • Select an option

  • Save rjfrizz/eef3e75c9999e978dfd5e5c74ad2cc13 to your computer and use it in GitHub Desktop.

Select an option

Save rjfrizz/eef3e75c9999e978dfd5e5c74ad2cc13 to your computer and use it in GitHub Desktop.
/customers/order.liquid edits for the debut theme
...(beginning of file, about 20 lines)
<table class="responsive-table">
<thead>
<tr>
<th>{{ 'customer.order.product' | t }}</th>
<th>{{ 'customer.order.sku' | t }}</th>
<th>{{ 'customer.order.price' | t }}</th>
<th>{{ 'customer.order.quantity' | t }}</th>
<th>{{ 'customer.order.total' | t }}</th>
</tr>
</thead>
<tbody>
{% for line_item in order.line_items %}
- <tr id="{{ line_item.key }}" class="responsive-table__row" >
+ <tr id="{{ line_item.key }}" class="responsive-table__row" style="{% include 'product-customizer-helper' with 'hide-pricing-item-row', item: line_item %}">
<td data-label="{{ 'customer.order.product' | t }}">
{{ line_item.title | link_to: line_item.product.url }}
+ {% include 'product-customizer-helper' item: line_item %}
{% if line_item.fulfillment %}
<div class="note">
{%- assign created_at = line_item.fulfillment.created_at | date: format: 'month_day_year' -%}
{{ 'customer.order.fulfilled_at' | t: date: created_at }}
{% if line_item.fulfillment.tracking_number %}
<a href="{{ line_item.fulfillment.tracking_url }}">{{ line_item.fulfillment.tracking_company }} #{{ line_item.fulfillment.tracking_number}}</a>
{% endif %}
</div>
{% endif %}
</td>
<td data-label="{{ 'customer.order.sku' | t }}">{{ line_item.sku }}</td>
- <td data-label="{{ 'customer.order.price' | t }}">{{ line_item.price | money }}</td>
+ <td data-label="{{ 'customer.order.price' | t }}">{% include 'product-customizer-helper' with 'item-price', item: line_item, items: order.line_items %}</td>
<td data-label="{{ 'customer.order.quantity' | t }}">{{ line_item.quantity }}</td>
- <td data-label="{{ 'customer.order.total' | t }}">{{ line_item.quantity | times: line_item.price | money }}</td>
+ <td data-label="{{ 'customer.order.total' | t }}">{% capture item_price %}{% include 'product-customizer-helper' with 'item-price', item: line_item, items: order.line_items, raw: true %}{% endcapture %}{{ line_item.quantity | times: item_price | money }}</td>
</tr>
{% endfor %}
</tbody>
...(rest of customer order template file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment