Account page order quantity!

Serafeim
New Member
10 0 0

Hello. How can i display the total quantity of all products  for a customer order?

Replies 2 (2)
AvidBrio
Shopify Expert
231 12 18

@Serafeim 

here is code you can put where you want to make sure the order object access. on that file

 {%- for order in customer.orders -%}

{{ order.total_price | money_without_trailing_zeros }}


 {%- endfor -%}
If you find our comment helpful, hit the like button and accept it as a solution.
Want us to implement custom changes in your store? Contact us
Email me directly - jim@avidbrio.com
IttantaTech
Shopify Partner
510 55 92

@Serafeim 

Use this code in your customers/order.liquid file.

{% assign total_quantity = 0 %}
{% for line_item in order.line_items %}
{% assign total_quantity = total_quantity | plus:line_item.quantity %}
{% endfor %}

<h1>Total Quantity = {{total_quantity}}</h1>

Thanks,
Ittanta Technologies Pvt. Ltd. | Shopify Expert
If reply is helpful, please Like and Accept Solution.
To hire us, contact us at info@ittanta.com