04
/Dec
How hide sold out product from the collection page without app
{% assign css_class = css_class | append: ' ' | append: push_class | append: ' ' | append: mobile_class %}
{% assign product_qty = 0 %}
{% for variant in product.variants %}
{% if variant.inventory_quantity > 0 %}
{% assign product_qty = product_qty | plus: variant.inventory_quantity %}
{% endif %}
{% endfor %}
{% if product_qty > 0 %}
{% render 'product-item', product: product, css_class: css_class, scroll_speed: scroll_speed %}
{%endif
Post a Comment!