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()
8484 }
8585 } catch (\Magento \Framework \Exception \LocalizedException $ e ) {
8686 $ 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.
9090 } catch (\Exception $ e ) {
9191 $ this ->messageManager ->addExceptionMessage ($ e , __ ('We can \'t update the shopping cart. ' ));
9292 $ this ->_objectManager ->get (\Psr \Log \LoggerInterface::class)->critical ($ e );
You can’t perform that action at this time.
0 commit comments