Articles on: Scenarios

How to Block Multiple Collections from Being in a Single Cart

Overview


To do this you will need to create 3 new limits, 2 that serves as rules to determine if there is a "single course" and a "bulk course" in cart and one to block the cart if those rules are true.

For the first limit:
Create a limit called "Rule: Single course in cart"
Set this limit as inactive (inactive limits can be used as rules)
Select the "collection" limit type
Check the "Force Limit" option
Select the "Single course" collection
Set a minimum quantity of 1
Save

For the second limit:
Create a limit called "Rule: Bulk course in cart"
Set this limit as inactive
Select the "collection" limit type
Check the "Force Limit" option
Select the "Bulk course" collection
Set a minimum quantity of 1
Save

Finally for the last limit:
Create a limit called "Block cart if bulk and single are in cart" (Or what you prefer)
Set this one to active
Select the "Whole Cart" limit type
Add an activation rule with the "Limit" type, select the "Rule: Single course in cart" limit and set it to "Is Respected"
Select "AND" to add another condition. Using "AND" here instead of "OR" is important, it makes sure that the limit is only active if both rules are true.
For the other condition, again select the "Limit" type, select the "Rule: Bulk course in cart" limit and set it to "Is Respected"
Set the Maximum quantity to 0
Make sure to give it a custom text that says something like "Single and Bulk SKUs cannot be combined"
Save.

By doing this you are setting a limit with a maximum quantity of 0 (basically always locked) that is only active if there is at least 1 "single course" AND at least 1 "Bulk course" products. It's important to set a custom text here as you wouldn't want the default warning message that says "Maximum quantity for the whole cart should be less or equal to 0".

Updated on: 11/09/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!