Focusing on managing products, variants, and collections through the API.
Hi community,
I would like to hide the products that are out of stock.
I want a script to use in a liquid file. I don’t want to use any paid app
Hey @pedromonteirouk
Here are some options: https://help.shopify.com/en/manual/products/inventory/getting-started-with-inventory/hide-out-of-sto...
Otherwise to specifically use liquid, try something like this on collection pages:
{% for product in collections.all.products %}
{% if product.available %}
<!-- Product card here -->
{% endif %}
{% endfor %}
Scott | Developer Advocate @ Shopify