All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Is it possible to get the total spend per product on the product page? I'd like the customer to see how much they are spending on each product before adding t teh cart. I do not want the total cart amount to appear on the product page. I have 2-3 variants per product and at the moment no total appears on the product page (even if the customer is only buying a qty of 1). I am using Shopify Masonry.
I used this code and managed to get the text "total spent: $0" - but it didn't calculate the money and only said $0
{% assign total_spend = product.price | times: quantity %} <p>Total Spend: {{ total_spend | money }}</p>
Hello @needhelp8 ,
{% assign quantity = 2 %}
{% assign total_spend = product.price | times: quantity %}
<p>Total Spend: {{ total_spend | money }}</p>
But in this way quantity will be static and total never be changed on change of the quantity.
Regards
Guleria