How to understand the logic of the "At first apply discount to" option?

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:
       1. The products in the cart are sorted by price;
       2. 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 the cheapest items in the cart, please use The Cheapest, also for Buy 1 get 1 free action instead.

      • Announcements

      • Already Done in Q1'23

        Brand new extensions We launched a coming soon page for the new Back Forward Cache extension. It restores the recently visited page when the customer clicks 'Back' or 'Forward' browser options, thus ensuring faster page load speed. Subscribe to the release
      • Roadmap | What to expect in Q1'23

        New features and improvements Improved Layered Navigation generate SEO-friendly URLs for multi-select Category filter; better speed performance of the Apply filters button; improve Category list load time. Special Promotions Pro optimize data types in
      • Already Done in Q4'22

        New Amasty services Make sure your site is well-performing with our E-commerce QA testing service. Let our specialists check various elements of your website and get the issues fixed. The service is available for any e-commerce platform (Magento, Shopify,
      • Roadmap | What to expect in Q4'22

        New features and improvements Elastic Search better performance of synonyms; REST API support. Product Labels enhanced extension performance with a lot of products on the page. Blog Pro posts migration from one Magento instance to another; email notifications
      • Already done in Q3'22

        New solutions Our new SaaS tool - Website SEO Health Check. Discover the most severe SEO mistakes which can damage your website. Available as part of Pro and Premium SEO Toolkit. New features and improvements Import and Export NEW we added the possibility