- I want to create multi-select color and size filter for the Shopify
how to get it done.
As per the default filters, the search parameter is sent in the URL, but I am unable to find where the query is executed.
As per the default filters, the search parameter is sent in the URL, but I am unable to find where the query is executed.
2
Answers
First, I would read the following documentation to get an understanding of how filtering by tags works in Shopify.
https://help.shopify.com/themes/customization/collections/filter-collections-with-product-tags
https://gist.github.com/carolineschnapp/3351324
By default, products can only be filtered by 1 query of tags of each type at a time. To understand how these queries are returned from the server, you can type in a URL like this to your browser, and review the returned results (which may need to be altered to fit your product collection’s tags).
A few years ago, I built a JS solution which combined all possible combinations of tags selected and sent multiple AJAX requests to different URLs, and appended the results to the page. The store is no longer Live, so I cannot provide a link. If you are still interested in a JavaScript solution, I would review how some of the paid themes with JS filtering work to get an idea.
From your Shopify admin, go to Online Store > Navigation.
Scroll down to Collection and search filters.
Click Add filters.
Select one or more filter options from the list of available filters.
Click Done to save your product options.
Click Save to update your collection and search filters.