AND/OR Logic for Collections

AND/OR Logic for Collections

idawoodsv
Tourist
8 0 2

How has Shopify still not implemented conditional AND/OR logic for each condition in Smart Collections? For example, I can't create a smart collection that includes Product Type = Gloves AND (Tag = Gender_Men's OR Tag = Gender_Unisex). I can either set it to "All Conditions" so that I get no gloves (since gloves are tagged with "Mens" or "Unisex", not both), or set it to "Any Conditions" which brings in all products with any of the above conditions.

 

This seems like really simple logic to implement at the condition level, I'm amazed they haven't done it yet. 

Replies 2 (2)

wiswilliams
Shopify Partner
3 0 0

Shopify's Smart Collections now allow you to select either "All Conditions" (AND) or "Any Conditions" (OR), but not both. That prevents you from creating a collection that will do something like "Product Type = Gloves AND (Tag = Men's OR Tag = Unisex)", because "All Conditions" would require both tags to be present on an item, and "Any Conditions" would include too many items.

rakeshd0nga
Visitor
1 0 0

You're spot on—this has been a long-standing limitation in Shopify’s Smart Collections. The current "All" vs. "Any" logic applies to the entire condition group, which doesn’t support more nuanced logic like nested AND/OR combinations.

It would be a game-changer if Shopify allowed conditional grouping—something like:
Product Type = Gloves

AND (Tag = Gender_Men’s OR Tag = Gender_Unisex)

For now, many merchants end up:

  • Using manual collections (not ideal at scale), or

  • Writing custom scripts or metafields to tag products dynamically based on combined logic.

Some also build custom collection filters via Shopify APIs or third-party apps, though it adds dev overhead.

Hopefully Shopify considers enhancing this in future releases—it's a small change on the surface but would make Smart Collections far more powerful for merchandising and automation.

 

Rakesh Donga