File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
app/code/Magento/Checkout/Model Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -536,13 +536,12 @@ public function updateItems($data)
536
536
537
537
$ qty = isset ($ itemInfo ['qty ' ]) ? (double )$ itemInfo ['qty ' ] : false ;
538
538
if ($ qty > 0 ) {
539
+ $ item ->clearMessage ();
540
+ $ item ->setHasError (false );
541
+ $ item ->setQty ($ qty );
542
+
539
543
if ($ item ->getHasError ()) {
540
- $ deferredErrors [$ item ->getId ()] = __ ($ item ->getMessage ());
541
- continue ;
542
- } else {
543
- $ item ->clearMessage ();
544
- $ item ->setHasError (false );
545
- $ item ->setQty ($ qty );
544
+ throw new \Magento \Framework \Exception \LocalizedException (__ ($ item ->getMessage ()));
546
545
}
547
546
548
547
if (isset ($ itemInfo ['before_suggest_qty ' ]) && $ itemInfo ['before_suggest_qty ' ] != $ qty ) {
@@ -566,10 +565,6 @@ public function updateItems($data)
566
565
['cart ' => $ this , 'info ' => $ infoDataObject ]
567
566
);
568
567
569
- if (count ($ deferredErrors )) {
570
- throw new \Magento \Framework \Exception \LocalizedException (current ($ deferredErrors ));
571
- }
572
-
573
568
return $ this ;
574
569
}
575
570
You can’t perform that action at this time.
0 commit comments