How can I display variant inventory quantities using the Taste Template?

Topic summary

A user working with Shopify’s Taste Template wants to display variant inventory quantities on product pages. They found a Shopify help article but need implementation guidance.\n\nSolution Provided:\n- Add Liquid code to product.template.liquid or main-product.liquid\n- The code loops through product variants, sums available inventory quantities, and displays a \

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

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