Are my "Each N-th" working correctly, and how is the "At first apply discount to" setting used?

Are my "Each N-th" working correctly, and how is the "At first apply discount to" setting used?

One group of actions from the Special Promotions module called Each N-th has a special At first apply discount to setting that might be considered inconsistent and broken at a first glance if it is used to add a simple discount to some cheapest products in cart. However, it hides a more complicated algorithm behind it than just locating the cheapest products, so its use case needs to be reviewed in more detail. In this article, you'll find the overall information regarding the setting logic to help you configure your promotions correctly, and also what alternative actions can be used if this logic doesn't satisfy your requirements. 

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. 

In case you want the rule to apply a discount to several cheapest items in the cart in a row, please use The Cheapest, also for Buy 1 get 1 free action instead.