JustinWDev of Archived Theme Support
11/25/2014 - 6:48 PM

List unfulfilled line items in Shipping Confirmation and Shipping Update email templates.

List unfulfilled line items in Shipping Confirmation and Shipping Update email templates.

<h3>Unfulfilled Items</h3>
<ul>
{% for item in line_items %}
  {% assign found_item = false %}
  {% for fulfilled_item in fulfillment.fulfillment_line_items %}
    {% if item.id == fulfilled_item.line_item.id %}
      {% assign found_item = true %}
      {% unless item.quantity == fulfilled_item.quantity %}
      <li>{{ item.title }}: {{ item.quantity | minus: fulfilled_item.quantity }}</li>
      {% endunless %}
    {% endif %}
  {% endfor %}
  {% unless found_item %}
  <li>{{ item.title }}: {{ item.quantity }}</li>
  {% endunless %}
{% endfor %}
</ul>