File tree Expand file tree Collapse file tree 3 files changed +5
-17
lines changed
app/code/Magento/Quote/Model Expand file tree Collapse file tree 3 files changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ public function __construct(ScopeConfigInterface $config)
35
35
*/
36
36
public function isEnabled (): bool
37
37
{
38
- //return (bool)$this->config->getValue(self::XML_PATH_INVENTORY_CHECK_ENABLED);
39
- return false ;
38
+ return (bool )$ this ->config ->getValue (self ::XML_PATH_INVENTORY_CHECK_ENABLED );
40
39
}
41
40
}
Original file line number Diff line number Diff line change @@ -318,16 +318,16 @@ public function getStore()
318
318
}
319
319
320
320
/**
321
- * Set and Validate Item Qty
321
+ * Checking item data
322
322
*
323
- * @return void
323
+ * @return $this
324
324
*/
325
- public function setQuantity ()
325
+ public function checkData ()
326
326
{
327
327
$ this ->setHasError (false );
328
328
$ this ->clearMessage ();
329
-
330
329
$ qty = $ this ->_getData ('qty ' );
330
+
331
331
try {
332
332
$ this ->setQty ($ qty );
333
333
} catch (\Magento \Framework \Exception \LocalizedException $ e ) {
@@ -337,16 +337,7 @@ public function setQuantity()
337
337
$ this ->setHasError (true );
338
338
$ this ->setMessage (__ ('Item qty declaration error ' ));
339
339
}
340
- }
341
340
342
- /**
343
- * Checking item data
344
- *
345
- * @return $this
346
- */
347
- public function checkData ()
348
- {
349
- $ this ->setQuantity ();
350
341
try {
351
342
$ this ->getProduct ()->getTypeInstance ()->checkProductBuyState ($ this ->getProduct ());
352
343
} catch (\Magento \Framework \Exception \LocalizedException $ e ) {
Original file line number Diff line number Diff line change @@ -293,8 +293,6 @@ 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 ();
298
296
}
299
297
}
300
298
}
You can’t perform that action at this time.
0 commit comments