cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict product promotions being applied on cart

bsandeep544
Explorer

Hello Team,

We are working on hybris 6.5 and We have a use case to apply either custom discount (derived dynamically from external system) or apply promotional discount which ever is highest on cart.

I cant use OOTB restriction on a single promotion, as i have to consider sum of all promotional discounts vs my custom discount.

My question is, is there a way to get sum of all the product promotional discounts on cart, before applying them on cart?

I tried OOTB methods with AutoApplyMode as APPLY_NONE and KEEP_APPLIED, I see both of them applying the discounts on cart, and the mode is not considered in super method, updatePromotions and in updatePromotionsNotThreadSafe.

  1.   PromotionOrderResults resultsWithApplyNone = getPromotionsService().updatePromotions(getPromotionGroups(),
                                         childCart, true,
                                         de.hybris.platform.promotions.jalo.PromotionsManager.AutoApplyMode.APPLY_NONE,
                                         de.hybris.platform.promotions.jalo.PromotionsManager.AutoApplyMode.APPLY_NONE,
                                         getTimeService().getCurrentTime());
    
    
    
  2. PromotionOrderResults resultsWithKeepApplied = getPromotionsService().updatePromotions(getPromotionGroups(), childCart, true, de.hybris.platform.promotions.jalo.PromotionsManager.AutoApplyMode.KEEP_APPLIED, de.hybris.platform.promotions.jalo.PromotionsManager.AutoApplyMode.KEEP_APPLIED, getTimeService().getCurrentTime());

Regards, Sandeep

Accepted Solutions (0)

Answers (0)