Focusing on managing products, variants, and collections through the API.
Hello,
I am trying to make a "Last product available" mention appear on the product grid in the same way as the "Sold Out" mentions that already appear, but I can't find how to do it.
I can make the low stock status appear on the product page concerned, but I would like it to also appear on the product grid.
Thank you very much for your help!
Vincent
@ColLegno Go to Edit code > product-template.liquid file and find the place where you want to show the low stock alert or last product available. you can use below code -
{% assign lowStockThreshold = 10 %}
{% if product.available and product.inventory_quantity <= lowStockThreshold %}
<div>
<p>Hurry! Only {{ product.inventory_quantity }} left in stock.</p>
</div>
{% endif %}
You can change the low stock qty as per your requirement I set 10 qty.
please let me know if works!
@saim007 Thank you very much for your answer! Unfortunately I'm afraid I'm a big noob and I can't find this famous product-template.liquid file
How can I contact you directly to find an arrangement with you and get a solution to my problem?
Thank you very much!
@ColLegno Please provide your store url?
@ColLegno Your email id is - info@col-legno.fr