All things Shopify and commerce
Is there a way to have AND and OR Conditions for Shopify Collections? It's strange that this feature is not available for Smart Collections.
I'm trying to create Sale Collections that have products that use different 'Type' conditions while also having 'Compare-at-price' conditions.
Hello @aldain
Shopify’s Smart Collections (Automated Collections) only allow all conditions (AND) or any condition (OR), but not a mix of both (AND + OR together). However, you can work around this limitation using these methods:
1. Use Multiple Smart Collections (Workaround)
Since Shopify doesn’t support AND/OR combinations within a single smart collection, you can stack collections to achieve this effect:
Step 1: Create multiple Smart Collections for each OR condition separately.
Step 2: Create a new Manual Collection that includes all the products from the previous Smart Collections.
For example:
.Smart Collection 1 (OR Condition):
.Product Type = "Shoes"
.OR Product Type = "Bags"
Smart Collection 2 (AND Condition):
.Compare-at-price > 0 (Sale items)
.Final Collection (Manual):
.Add all products from Smart Collection 1 and Smart Collection 2.
This way, products that match either condition set will be included.
2. Use Tags for More Control
Another method is to use product tags to simulate AND/OR conditions:
.Assign tags like on-sale, shoes, bags, etc.
.Then create a Smart Collection with ANY condition (OR logic) for these tags.
This approach lets you manage conditions flexibly by assigning tags manually or via bulk updates.
3. Use Shopify Flow (For Shopify Plus)
If you're on Shopify Plus, you can automate tagging using Shopify Flow:
.Create a workflow to add a tag when conditions are met (e.g., Type = Shoes AND Compare-at-price > 0).
.Then create a Smart Collection based on that tag.
4. Custom Code (For Advanced Users)
If you're comfortable with Liquid, you can use a manual collection and modify the theme code to filter products dynamically using AND/OR logic.
Thank you 😊
Thanks for the reply Goldi – I'll give this a try!
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025