Skip to content

Commit cb554e0

Browse files
committed
ACP2E-4192: [Cloud] Stock limit exceeded notification message is displayed twice when Out-of-Stock Threshold is hit
1 parent d040afd commit cb554e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/Checkout/Controller/Cart/UpdatePost.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ protected function _updateShoppingCart()
8787
// We do not add an error message to messageManager here to prevent duplicate error messages
8888
// on the cart page. The frontend AJAX validation already displays this error, and the backend message
8989
// would cause duplication after page reload.
90+
$this->messageManager->addErrorMessage(
91+
$this->_objectManager->get(\Magento\Framework\Escaper::class)->escapeHtml($e->getMessage())
92+
);
9093
} catch (\Exception $e) {
9194
$this->messageManager->addExceptionMessage($e, __('We can\'t update the shopping cart.'));
9295
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);

0 commit comments

Comments
 (0)