Shopify themes, liquid, logos, and UX
How do I show the quantity of items sold on the product page? So that the quantity in stock is equal to that of sold + 1..
I use the code like this, but every time there is a sale, the value goes down xD
{% assign product_qty = 0 %}
{% for variant in product.variants %}
{% if variant.inventory_quantity > 0 %}
{% assign product_qty = product_qty | plus: variant.inventory_quantity %}
{% endif %}
{% endfor %}
{% if product_qty > 0 %}
{{ product_qty }} sold.
{% endif %}
User | RANK |
---|---|
74 | |
73 | |
66 | |
63 | |
41 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023