I am trying to display inventory counts for my items, but seem to be missing something,
I tried this code, but it doesn't work:
</li>
{% 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" %}
There are {{ current_variant.inventory_quantity }} left in stock.
{% else %}
This product is available.
{% endif %}
</div>
{% endfor %}
I have items with and without variants and neither display an inventory count.
Hi,
what's assigned to current_variant, because code is correct
Ok, so its working now or need any help.
If helpful then please LIKE and ACCEPT solution so i can help other.
Please check in file where current_variant are assigned before this code. like bellow
{% assign current_variant= something...%}
User | Count |
---|---|
442 | |
192 | |
138 | |
62 | |
42 |