Is it possible to count unique products in the cart instead of the total quantity?
Starting with version 2.20.0 the Special Promotions Pro module has a condition for counting unique product SKUs in the shopping cart. You need to install the 'amasty/module-special-promo-conditions' package from composer suggest to use this functionality (the functionality is available as a part of an active product subscription or support subscription).
Once installed, you will find a new Unique SKU Count condition that will check how many different SKUs are in the shopping cart. The rule is applied only when the cart contains the required number of unique SKUs.
Let's see the work of this condition on the example. The rule is the following:
- if 3 products are added to the cart, the third one has a 50% discount;
- there should be 2 or more unique SKUs for the rule to be triggered.
When 3 products with the same SKU are added to the cart, there's no discount:
When the cart contains 2 or more SKUs, the rule is triggered and one of the products gets a 50% discount: