{%- if product.variants[forloop.index0].inventory_quantity > 1 -%}
{{ value | escape }}
{%- else -%}
{{ value | escape }}
{%- endif -%}
I’ve used this code to show the thunder icon on variation boxes with inventory above 0. But icons are still showing with inventory 0. Below is the reference screenshot. here everything is fine but XL, 2XL, 3XL, 4XL are o in inventory.
