Re: how do I display the total number of items in a customer's order in Order Printer?

how do I display the total number of items in a customer's order in Order Printer?

Matt_Dubinsky
Excursionist
27 0 11

I am currently trying to edit my invoice template code in order printer in order to add the total number of items that the customer ordered.  I like to use this as a double check on myself when i pull orders to make sure i have pulled the correct total number of total items and avoid accidently shipping incomplete orders especially on large multi item orders that span multiple pages.

 

Any help would be greatly appreciated on this!

 

Thanks

 

 

Reply 1 (1)

B1kerdel
Excursionist
15 1 2

Try this

<div class="row">
<div class="col-xs-8">
{% assign total_items_count = 0 %}
{% for line_item in line_items %}
{% assign total_items_count = total_items_count | plus: line_item.quantity %}
{% endfor %}
<li class="order-details-item-count">
<span class="order-details-title editable" data-key="total_items_count">Total items</span>
<span class="order-details-text">{{ total_items_count }}</span>
</li>