How to understand the logic of the "At first apply discount to" option?
Some of the Special Promotions cart price actions have the At first apply discount to setting that might be confusing at first glance. In this article, you'll find the overall information regarding the setting logic to help you configure your promotions correctly.
The main point is that cart price rules with actions such as Each N-th follow the below algorithm:
⇾ The products in the cart are sorted by price;
⇾ The promo action is applied.
Let's review an example.
There is a cart price rule with the Each N-th (Percent Discount: each 2-d, 4-th, 6-th with 15% Off) action.
According to the rule logic, the discount will be applied to each second item since the Each N-th setting was set to '2'. Also, the sorting will start from the cheapest product in the cart as per the At first apply to setting.
The frontend result is corresponding:
As you may see, the discount was provided to the second cheapest product in the cart following the extension logic.