Shopify themes, liquid, logos, and UX
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
I feel like this really shouldn't be that difficult. Would anybody have the code that I need to copy and paste into the product page template?
I could use that too 🙂
Hey @Stage I just use the following custom liquid field on my product page.
<DIV>{% if product.variants.first.inventory_management == "shopify" and product.variants.first.inventory_quantity < 6 and product.variants.first.inventory_quantity > 0 %}
Only {{ product.variants.first.inventory_quantity }} left in stock!
{% endif %}</DIV>
This looks to see if there are fewer than 6 in stock but more than 0 products and then outputs, "Only 3 left in stock!"
If the product is out of stock it's hidden and if there are 6 or more in stock it's hidden. Just change the numbers as required.
Hi,
this keeps saying only 1 in stock but I have more?
do you possibly have a solution please??
It works great, thank you. The only problem is that it doesn't work with a product with multiple variants. It just shows the stock quantity of the first variant...
Hi 👋
I ended up getting the Shopify tea to resolve this for me. They were really helpful.
I couldn’t find a way to resolve the issue with variants without them.
Bec
User | RANK |
---|---|
119 | |
87 | |
74 | |
64 | |
47 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022