{% 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>