Support multiple errors in Promotion Handlers #4587
kennyadsl
started this conversation in
New Features or Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
At the moment, applying a promotion coupon (but I think it is an issue present also in the other promotion handlers) consider a single error possible.
Setting the error happens through setting an
errorattribute on the class, along with astatus_code.The problem is where we have multiple errors for the same promotion, for example, if the coupon code is added to an order that does not meet multiple promotion rules for that promotion, as discussed here.
A possible solution
I think we should change
errortoerrorsadding a new class that represent thatPromotionHandlerErrorconcept, or something similar. We should also try to deprecate the current usage oferrorandstatus_codeprinting a deprecation warning and falling back to the firstPromotionHandlerErrorassociated with that PromotionHandler.cc @fkoessler
Beta Was this translation helpful? Give feedback.
All reactions