We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HLD] Inconsistent saving of Stock Data
We have the following situation in _\Magento\Catalog\Model\Product.php#L2298
/** * Check whether stock status changed * * @return bool */ private function isStockStatusChanged() { $stockItem = null; $extendedAttributes = $this->getExtensionAttributes(); if ($extendedAttributes !== null) { $stockItem = $extendedAttributes->getStockItem(); } $stockData = $this->getStockData(); return ( (is_array($stockData)) && array_key_exists('is_in_stock', $stockData) && (null !== $stockItem) && ($stockItem->getIsInStock() != $stockData['is_in_stock']) ); }
We need to DELETE or REFACT this code. So, we need to check the origin of the Stock Status value. We can solve in several ways:
class ProductOriginStockStatusChecker { public function getValue() { // resolving from origin data or direct call to db or } }
The text was updated successfully, but these errors were encountered:
Merge pull request #22 from magento-l3/PR-38194-37718-35016
f99c62f
Combined PR: MC-38194 MC-37718 MC-35016
naydav
No branches or pull requests
Full context in documentation
[HLD] Inconsistent saving of Stock Data
Description
We have the following situation in _\Magento\Catalog\Model\Product.php#L2298
We need to DELETE or REFACT this code.
So, we need to check the origin of the Stock Status value. We can solve in several ways:
The text was updated successfully, but these errors were encountered: