Shopify Function · Cart and checkout validation
Limit shoppers to five items from a collection
Block checkout when the buyer adds more than five items from a collection you choose.
How the rule works
-
- When
- The shopper adds more than five units from your chosen collection.
- Then
- Block checkout and ask the shopper to reduce the quantity to five or fewer.
What shoppers see
- 6 eligible items
- Checkout pauses with the message “Please order five or fewer items from this collection.”
- 5 eligible items
- The shopper can continue through checkout.
Set it up in your shop
Choose the condition that blocks checkout and write the message buyers will see. Test a blocked cart, then make the change the message asks for.
Open the rule as a draft in Mechanic. Test it with your products before publishing.
Customize this Function in Mechanic