I am trying to add the quantity of my products so customers are able to see how many products I have in stock on my website.
I cannot find the product template liquid code to paste the quantity code.
Is there a way anyone can help with this issue?
I am trying to add the quantity of my products so customers are able to see how many products I have in stock on my website.
I cannot find the product template liquid code to paste the quantity code.
Is there a way anyone can help with this issue?
Hello @Rosalynmitchell ,
Hope you are doing well.
Find the product.liquid theme file, in that search for the product-template.liquid, hover the pointer over that text and you’ll see the pointing arrow, click on that to go to the product template file.
If you don’t find the file then please share the full screenshot of the product.liquid file, so that I can check and guide you accordingly.
do you have a email I can send screenshots too? They don’t upload correctly on here.
Hey @Rosalynmitchell ,
Thanks for getting back to me.
Yes, you can send me an email at [email removed]
Hi @Rosalynmitchell ,
If your product does not have a variant, you can use code: {{ product.first_available_variant }}
If your product has multiple variants, you can use the code to display the inventory quantity of each variant: {% for variant in product.variants %} {{ variant.title }} ({{ variant.inventory_quantity }}) {% endfor %}
With variant.inventory_quantity: Return the variant’s inventory quantity.
Hope it is clear to you.
If my answer can help you solve your issue, please mark it as a solution. Thank you and good luck.