I am using the Taste Template and I am looking to show variant inventor quantities. I found this (see link) But it doesn’t give me instructions how to.
Can someone point me in the right direction or would it be easier to get support from shopify on this
https://help.shopify.com/en/manual/online-store/themes/theme-support/theme-support-customization#show-variant-inventory-on-the-product-page
Hi @amandamarielars
This is Victor from PageFly - Shopify Page Builder App
You will need to use the Shopify liquid code to get the value and display it on the template you want ( product for example )
You can add this code into your product.template.liquid or main-product.liquid where you want to add
{% 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 %}
HURRY! Selling out fast! Only **{{ product_qty }}** left in stock!
{% endif %}
Hope this can help you solve the issue
Best regards,
Victor | PageFly
Thanks!! I will try it when I get home!
Hi @amandamarielars , make sure you update your theme to latest version (8.0) so you can add it on your theme customize > product page