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 %}
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