Best way of filtering product with multiple parameters using custom code

I’m nearing completion of my first ever Shopify theme. What’s the best way of doing this sidebar filter? Should the page reload or just change the collection on click like AJAX or what? Also I’m not using jquery in my current theme. Here’s the sidebar

Also in the sidebar, is “Shop by categories” a collection or a type? and “Filter by brand” vendor? I’m really confused about this part in Shopify. Thanks!

@stressedowner

if you have use theme default filter that would be grate bcz some time doesn’t proper work custom code

No. I’m building a theme from scratch to understand Shopify’s design principles.

@stressedowner

great please try on your custom filter code

Hi @stressedowner ,

You should use ajax to load filter, it will improve user experience and most themes use it.

And this doesn’t need to use jquery, you can refer to Dawn theme, it will help you better understand how filter works with ajax.

Hope it helps!

Thank you.. Yeah I copied the collection-filters.liquid from Dawn and applied it to my theme and is working great. My only problem now is the asynchronous part. I can’t see it in the Dawn theme.

Hi @stressedowner ,

‘asynchronous part’: Can you explain more about it?

If it helped you solve your issue, please mark it as a solution. Thank you and good luck.

it’s when I clicked on the filter the collection changes without page reload. Currently, I’m pressing enter every time I change the filter and the page reloads.

Hi @stressedowner ,

If you have followed the Dawn theme, it will work with ajax, and the page won’t reload at all. Have you tried checking Dawn, is it what you are looking for? https://dawn-theme-default.myshopify.com/collections/shoes