Promotion Exclusion issue

Vote:
 

Hi Team,

     We have customised promotion to apply promotion only for lineitem that has required quantity. Now, when we exclude a promotion from other and two line items applicable for both promotions, only one promotion is getting applied for both.

      eg: we want one line item to get applied "buy 10 items and get 10%" and other to "buy 20 items and get 20% offer".

     If it is a single line item applicable for promotion, it works fine!.

Kindly help.

Thanks in advance

#201721
Feb 28, 2019 11:45
Vote:
 

Hi

To achive this behavior you need to use unit level exclusion, not order level (which is the default behavior). You can read about the differences here: https://world.episerver.com/documentation/developer-guides/commerce/marketing/promotion-exclusions/.

You can either supply a specific ExclusionLevel in the settings when you call the run method on the PromotionEngine. Or you can change the default behavior using config, see the key PromotionExclusionLevel here: https://world.episerver.com/documentation/developer-guides/commerce/configuration/feature-specific-commerce-configurations/

Regards

Per Gunsarfs

#201725
Feb 28, 2019 15:25
Vote:
 

Hi Per Gunsarfs,

                       Thanks for the reply!
                       I tried this one,

                      "cart.ApplyDiscounts(promotionEngine, new PromotionEngineSettings() { ExclusionLevel = ExclusionLevel.Unit })"

                      but did not work.

Thanks
                    

#201726
Edited, Feb 28, 2019 15:48
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.