How To Search Products Within a Collection in Shopify

Defaultly, Shopify will search for all published products from the store. It doesn’t support search products within a collection. But I have a trick that allows to search products within a particular collection.

We have 2 search parameters:

  • type: There are 3 search type page, article and product. We can use only one type parameter or combination them (separated by comma)
  • q: This is a search keyword parameter

In fact, Shopify allows filter the search result by product tag. So we can combine this to filter products from a particular collection.

Firstly, you must add tags for all products. The tag is the collection name.

Eg: The collection’s name is Shoes. So you must add the shoes tag for all products in this collection.

To search products in Shoes collection, you can use search query parameter: ?type=product&q=keyword+tag:shoes.

This is a basic guide to solution. To apply this way to the search feature on Shopify store, you need to have basic programming knowledge.

I hope this article is useful to you.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *