File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/Checkout/Controller/Cart Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,9 @@ protected function _updateShoppingCart()
84
84
}
85
85
} catch (\Magento \Framework \Exception \LocalizedException $ e ) {
86
86
$ this ->cart ->save ();
87
- $ this -> messageManager -> addErrorMessage (
88
- $ this -> _objectManager -> get (\ Magento \ Framework \Escaper::class)-> escapeHtml ( $ e -> getMessage ())
89
- );
87
+ // We do not add an error message to messageManager here to prevent duplicate error messages
88
+ // on the cart page. The frontend AJAX validation already displays this error, and the backend message
89
+ // would cause duplication after page reload.
90
90
} catch (\Exception $ e ) {
91
91
$ this ->messageManager ->addExceptionMessage ($ e , __ ('We can \'t update the shopping cart. ' ));
92
92
$ this ->_objectManager ->get (\Psr \Log \LoggerInterface::class)->critical ($ e );
You can’t perform that action at this time.
0 commit comments