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
This can e.g. by an issue if the re-calculation adds new errors, e.g. due to adding a state in the order route or due to time changes etc.
Probably similar issue with the other exceptions.
Solutions:
Create an empty cart with the provided error or error collection - depending on the exception type and add those errors.
Create a separate method that does what addCartErrors does but one can provide the cart error collection and the addCarterrors calls that one with the corresponding error colleciton.
Add the cart to the `InvalidCartException and use that cart to add the cart errors. However, that will not take the other exceptions into account.
Actual behaviour
Errors provided through InvalidCartException are ignored and the original cart errors are used.
How to reproduce
Fail safe method to reproduce:
Decorate: CartOrderRoute.
Add a state in decoarted CartOrderRoute.
Add a cart validator.
Add an error to the cart if the state added in CartOrderRoute exists.
The error will not be shown in the frontend, as the original cart did not have that error before re-calculation in the cart order route.
The text was updated successfully, but these errors were encountered:
PHP Version
8.1
Shopware Version
6.4.12.0
Expected behaviour
Show errors provided in
InvalidCartException
at https://github.com/shopware/platform/blob/v6.4.12.0/src/Storefront/Controller/CheckoutController.php#L220 instead of the errors from the original cart.This can e.g. by an issue if the re-calculation adds new errors, e.g. due to adding a state in the order route or due to time changes etc.
Probably similar issue with the other exceptions.
Solutions:
Actual behaviour
Errors provided through InvalidCartException are ignored and the original cart errors are used.
How to reproduce
Fail safe method to reproduce:
CartOrderRoute
.CartOrderRoute
.CartOrderRoute
exists.The text was updated successfully, but these errors were encountered: