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
-
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
error
attribute 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
error
toerrors
adding a new class that represent thatPromotionHandlerError
concept, or something similar. We should also try to deprecate the current usage oferror
andstatus_code
printing a deprecation warning and falling back to the firstPromotionHandlerError
associated with that PromotionHandler.cc @fkoessler
Beta Was this translation helpful? Give feedback.
All reactions