I want an “In Stock” / “Out of stock” notice under every product, how do I do it?
You could install a plugin that displays the message or you could write (or get someone like myself to write) the code which would look something like (but not exactly) this:
{% comment %} Inventory tracking on product page {% endcomment %}
<div id="variant-inventory" class="{% unless current_variant.available %} hide {% endunless %}">
{% if current_variant.inventory_management == "shopify" and current_variant.inventory_policy != "continue" %}
We have {{ current_variant.inventory_quantity }} in stock.
{% else %}
This product is available.
{% endif %}
</div>
Thanks for the help, I’m looking to do this by myself.
No worries, it’s not a big job, I wouldn’t personally charge for the time it would take to do it so just give me a shout if you need a hand ![]()
Thank you very much for your generosity, I really would like that if you can help me with that, tell me what you need ![]()
Help you in the sense that you would like me to add the code? If so, I’d need your store/ site domain. If you don’t want to publish it here, then you can email it to me matt@yakety.co.uk. You will get a request that shows the permissions I’m requesting to make the changes needed and you just confirm you’re happy with that and I’ll get it sorted for you, as I said, it’s just that block of code above with a some tweaks based upon your initial request.
Thank you very much! I sent you an email with all the details ![]()