You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to errors adding a new class that represent that PromotionHandlerError concept, or something similar. We should also try to deprecate the current usage of error and status_code printing a deprecation warning and falling back to the first PromotionHandlerError associated with that PromotionHandler.
This discussion was converted from issue #3227 on September 07, 2022 08:43.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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