Skip to content

Commit f1b275d

Browse files
committed
MCP-584: Disable inventory check on quote load
- Return customied config option; - Remove set quantity to quote item;
1 parent 9de77c9 commit f1b275d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

app/code/Magento/Quote/Model/Config.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public function __construct(ScopeConfigInterface $config)
3535
*/
3636
public function isEnabled(): bool
3737
{
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);
4039
}
4140
}

app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,6 @@ protected function _assignProducts(): self
293293
$item->setQtyOptions($qtyOptions)->setProduct($product);
294294
if ($this->config->isEnabled()) {
295295
$item->checkData();
296-
} else {
297-
$item->setQty((int)$item->getQty());
298296
}
299297

300298
}

0 commit comments

Comments
 (0)