I’m trying to separate certain products either by collection or by tags, so that I can have search bars for different products.
I’m trying to have a search bar that ONLY searches within a group of specific products, and would not return any products that aren’t within a specific collection or have a specific tag.
Then I might like to have another search bar that EXCLUDES a collection of products, so those don’t get mingled into a general search.
For example: A collection of Used T-Shirts in a general clothing store. If a user navigates to the Used T-Shirts page and performs a search, I’d only want search results within that Used T-Shirts collection (and not include any items in the general collection).
Similarly, if someone is browsing the general listing of clothes and performs a search, I’d like that to EXCLUDE anything in the Used T-Shirts section.
Does anyone know if this is easily achieved, through custom code in the Search Form? Or any other way?
You can create rules to exclude products from specific collections by going to Collections => Merchandising rules. To show the search bar for specific collection, ask the team in Live chat.
What finally made my life easier was using an app. I ended up with Rapid Search (rapidsearch.app), and the reason I’ve stuck with it is just easier. I liked that I didn’t have to mess with code. Just a couple clicks and it worked.