Skip to content

Instantly share code, notes, and snippets.

@mikestreety
Created March 3, 2015 09:11
Show Gist options
  • Save mikestreety/95721c65bd8cc04c4e36 to your computer and use it in GitHub Desktop.
Save mikestreety/95721c65bd8cc04c4e36 to your computer and use it in GitHub Desktop.
Shopify Filtering

So this is a story, all about how, I want to sort something out in Shopify...

I know with catgories and tags, Shopify has filtering built in. E.g. if I want to look at Shirts tagged with Red, I can do:

http://shopurl.com/collections/shirts/red

That's fine. I also know if I want large shirts that are red, the URL would be

http://shopurl.com/collections/shirts/red+large

This works with an and operator (e.g. Shirts that are red and large).

What I'm wondering is if there is a way I can pass in an or command someway.

E.g. if I want blue or red shirts (not blue and red). Does this exist?

I would expect something like:

http://shopurl.com/collections/shirts/red|blue or similar

@kinge
Copy link

kinge commented Mar 3, 2015

So maybe you have multiple product tags, not sure about how you wish to handle this front end wise is this any good.

https://docs.shopify.com/support/your-store/collections/filtering-a-collection-with-multiple-tag-drop-down

@mikestreety
Copy link
Author

@kinge that's exactly what i've got, but that only lets you select one option from each "category". In their example, I want Cotton OR Leather products.

@kinge
Copy link

kinge commented Mar 3, 2015

@alexsexton
Copy link

What happens if you give the select element multiple="true" and then try the https://docs.shopify.com/support/your-store/collections/filtering-a-collection-with-multiple-tag-drop-down example?

@mikestreety
Copy link
Author

@alexsexton Then it still makes them an and rather than an or

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment