on 2018 Oct 24 9:02 AM
Hi everyone!
So, I know I can retrieve coupon codes applied to an order by using order.getAppliedCouponCodes() but it won't tell me which promotions applied them so what I did was this:
Collect Promotion results by calling: order.getAllPromotionResults();
Extract AbstractRuleBasedPromotionActionModel from each ProductResult
Take the first element from the actionModel using getUsedCouponCodes() method
This works great when the promotion conditions only include Coupon Code but if they are inside a Group condition, getUsedCouponCodes() method always returns null even if the promotion was actually triggered by redeeming the coupon.
I also tried (unsuccessfully) using PromotionResultService, which includes a method to retrieve coupon codes by PromotionResult:
Optional<Set<String>> getCouponCodesFromPromotion(PromotionResultModel var1)
Does hybris 6.6 have a way to retrieve the coupon code given above scenario (Group conditions)?
Thanks!
Request clarification before answering.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.