App reviews, troubleshooting, and recommendations
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
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>
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025