{% assign inv_mngmt_size = product.variants[0].inventory_management | size %} {% assign limit_as_int = prod_stock_warn_limit_int | plus: 0 %} {% if product_compare_at_price > product_price and label_sale_show %} {{ sale_label }} {% elsif label_remain_show and variants_count == 1 and inv_mngmt_size > 0 and product.variants[0].inventory_quantity > 0 and product.variants[0].inventory_quantity <= limit_as_int %} {% assign quantity = product.variants[0].inventory_quantity %} Only {{ quantity }} left! {% else %} {% if product.available == false and label_soldout_show %} {{ sold_out_label }} {% else %} {% for tag in product.tags %} {% if tag contains 'meta-label-' %} {{ tag | remove: 'meta-label-' }} {% endif %} {% endfor %} {% endif %} {% endif %}