Total inventory count

stephen86
New Member
1 0 0

Hi all, 

I found this code to help me add a 'low stock' label to products

{% if product.first_available_variant.inventory_quantity < 2 %}
<span class="ProductItem__Label Heading Text--subdued">LOW STOCK</span>
{% endif %}

 
It's working, but how can I make it show for total inventory < 2 (instead of only first variant)?

Thanks

0 Likes