App reviews, troubleshooting, and recommendations
Trying to make it so that if stock exceeds 8 in stock it shows 8+ in the stock available on the product, is there an easy way to do this?
Hi @HVTS 👋 if the product has a single variant just check the first ones inventory_quantity amount in some liquid logic.
To show it in some themes use a custom-liquid block on the product templates main section for the product information.
https://shopify.dev/docs/api/liquid/objects/variant#variant-inventory_quantity
If the product has multiple variants with differing inventory that can be an advanced theme customization to update the theme when customers select different variants.
If you need this customization then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
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
If the stock already shows up in the product page, then changing how it will look if stock exceeds 8 will be easy. You just need to add a liquid conditional.
Currently, here is how your code will look:
Stock levels: {{ variant.inventory_quantity }}
You'll need to change it into:
{% assign current_stock = variant.inventory_quantity %}
Stock levels:
{% if current_stock >= 8 %}
8+
{% else %}
{{ current_stock }}
{% endif %}
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024