{% capture inventoryTotal %} {% assign total=0 %} {%for variant in product.variants %} {% capture i %}{{ total | plus:variant.inventory_quantity }}{%endcapture%} {% assign total = i %} {%endfor%} {% if total ==< 307 %} {{total | minus: 305 }} {%endif%} {% endcapture %} <div class="left-in-stock">*only {{ inventoryTotal }} left at this price</div>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter