File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
app/code/Magento/Quote/Model Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -318,17 +318,16 @@ public function getStore()
318
318
}
319
319
320
320
/**
321
- * Checking item data
321
+ * Set and Validate Item Qty
322
322
*
323
- * @return $this
323
+ * @return void
324
324
*/
325
- public function checkData ()
325
+ public function setQuantity ()
326
326
{
327
327
$ this ->setHasError (false );
328
328
$ this ->clearMessage ();
329
329
330
330
$ qty = $ this ->_getData ('qty ' );
331
-
332
331
try {
333
332
$ this ->setQty ($ qty );
334
333
} catch (\Magento \Framework \Exception \LocalizedException $ e ) {
@@ -338,7 +337,16 @@ public function checkData()
338
337
$ this ->setHasError (true );
339
338
$ this ->setMessage (__ ('Item qty declaration error ' ));
340
339
}
340
+ }
341
341
342
+ /**
343
+ * Checking item data
344
+ *
345
+ * @return $this
346
+ */
347
+ public function checkData ()
348
+ {
349
+ $ this ->setQuantity ();
342
350
try {
343
351
$ this ->getProduct ()->getTypeInstance ()->checkProductBuyState ($ this ->getProduct ());
344
352
} catch (\Magento \Framework \Exception \LocalizedException $ e ) {
Original file line number Diff line number Diff line change @@ -293,6 +293,8 @@ protected function _assignProducts(): self
293
293
$ item ->setQtyOptions ($ qtyOptions )->setProduct ($ product );
294
294
if ($ this ->config ->isEnabled ()) {
295
295
$ item ->checkData ();
296
+ } else {
297
+ $ item ->setQuantity ();
296
298
}
297
299
}
298
300
}
You can’t perform that action at this time.
0 commit comments