Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Currently setting up Enterprise theme for our shop and would like to use the Shopify filtering, but when I pick Base as a filter option, it shows every item that has that base regardless of if it's in stock. Is there a way to make it show only the ones that are actually available? Our current filter app lets us use tags, and we have a separate app that automatically tags products when their variants have stock.
store is https://oinkpigments.com/ currently on Venture theme, but switching to Enterprise.
You can add these liquid codes
You can try using this code
{% assign available_products = collection.products %}
{% for filter in collection.filters %}
{% if filter.active_values.size %}
{% assign available_products = collection.products | where: 'available' %}
{% endif %}
{% endfor %}
{% for product in available_products -%}
[render code]
{%- endfor %}
Do you create the Base filter using a product option or tags? If you're open to using a third-party solution, our app allows filtering by available variants only, ensuring that customers only see in-stock items when they apply filters.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025