Standalone code for collection filter in Shopify 2.0

I want to build a totally bespoke (clean) theme for 2.0, but would be great to tap into the new collection filtering without having to write it all from scratch. Does anyone know of any barebones 2.0 themes or even liquid snippets to handle this?

1 Like

Hey you’re in luck @alexmorris :


That should work when adding it to a collection page.

I got this from the Shopify dev docs. Search “Support storefront filtering” on the Shopify dev docs. There you will find 2 examples of storefront filtering code - this is the first 1.

Hope this helps

1 Like

Thats awesome! do you happen to have the link to that dev page? Searching isn’t showing any example code :disappointed_face:

1 Like

Hey @alexmorris I would have sent the link but not sure whether the community mods are against sending link. But to be fair it is only to the shopify docs so here you go: https://shopify.dev/docs/themes/navigation-search/filtering/storefront-filtering/support-storefront-filtering

1 Like

Thanks for your sharing, it helped me a lot.
My theme has built-in filters by price, product type, and brand. However, the price filter on my theme uses a slider, I don’t like that so I found a way to replace the slider with an input box.
I was able to do that thanks to the documentation you shared, however I wanted the filter to work as soon as the customer enters the amount in the “from” box without having to click the “Apply” button. Can you help me do it? Thank!

Hey guys, I wonder if you can help me.

I am using Craft version 13.0.1 on my Shopify store and have the Search and Desicover app installed.

All works fine except for the availability filter. On my store all the products are available, but not all are in stock. Thus I need to filter on in-stock items and not available items. Is there anyway around the availability? I have contacted Shopify, which reffered me to thirdparty developers, which seems to be all in a Asian country and does not understand what I am in need of.

Any help would be apreciated.