Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi everyone. I am wanting to add a "low in stock" label to products which have less than 2 items left in stock. Same as when a product is sold out it has the "sold out" label underneath the image of the product in collections. Does anyone know how I can put that "low in stock" label for my products? Thanks!
Solved! Go to the solution
This is an accepted solution.
You can add in product-thumbnail.liquid file.
Cheers,
Tejas
You can use the following code:
{% if product.first_available_variant.inventory_quantity < 2 %}<div>low in stock</div>{% endif %}
Thank you,
Tejas
Hi @Tejas_Nadpara, thanks for replying! Where do I put that code? In the product snippet?
It depends on theme. Which theme you are using?
Thank you,
Tejas
This is an accepted solution.
You can add in product-thumbnail.liquid file.
Cheers,
Tejas
Hello,
Sorry to gatecrash the thread - would this work on the Brooklyn theme, and if so where would i put the code please?
Thanks in advance.
Simon
Yes, It will work on the Brooklyn theme as well.
Send me an email with your store URL, I will help you to put it on correct place.
Thank you,
Tejas
That's great - thanks so much for your very kind help.
clairabow.co.uk
Simon
Does anyone know where to put this snipped in the Palo Alto theme? Thanks!
Hi, sorry to message out of the blue but I am trying to do this in the Pipeline theme, however I cannot find a product-thumbnail.liquid file. Would you be able to please help point me in the right direction? My email is jdj.hall@gmail.com
Hey Tejas-
Does it work for Prestige theme? If so, can you apply it to only one product?
Cat
Hello Can i know how can i add Last piece Icon to an image on dawn theme?
Does this work in the Dawn theme? And where can I add it?
I would like to add this to our Stiletto theme (seniqbrand.com), if you can advise which liquid file to put this in please? Thank you!!
If you need these labels in the literal images so they work multichannel modemagic can edit images automatically https://apps.shopify.com/modemagic
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
@Tejas_Nadpara Does this work on Debut theme? I've been scouring for answers for so long.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024