Search within a Collection

Highlighted
Shopify Partner
6 0 2

I have a few collections, each with a thousand or more products. Some of my customers need to jump to a particular letter in the collection – for example, they may be looking for all products that start with "United States". On the previous website, we had "A B C ..." as links at the top of the collection listing, so that users could jump to the correct page. How can we achieve something like this within Shopify? Some ideas:

1. Search box at the top of the collection page that only searches within the collection. This appears impossible. Solutions similar to it would require that I tag every product in the collection with the name of the collection.

2. Tag products with the letter that they start with, and then have a dropdown that lets them jump to products with those tags. Doesn't feel like a good solution and a lot of legwork is involved.

3. Use Shopify's API from a separate server, to either query in real-time (e.g. /admin/products.json?collection_id=123&title=a) or to store the entire product database (and keep it updated via webhooks) and deliver results via ajax. Obviously not ideal and probabaly unrealistic in terms of performance and time to develop.

1 Like