Skip to content

Commit 239ef14

Browse files
committed
MC-19689: Simple product disappearing in the configurable grid after qty set to 0
1 parent 31a6cd7 commit 239ef14

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,15 +1304,11 @@ private function loadUsedProducts(\Magento\Catalog\Model\Product $product, $cach
13041304
{
13051305
$dataFieldName = $salableOnly ? $this->usedSalableProducts : $this->_usedProducts;
13061306
if (!$product->hasData($dataFieldName)) {
1307-
$usedProducts = $this->readUsedProductsCacheData($cacheKey);
1308-
if ($usedProducts === null) {
1309-
$collection = $this->getConfiguredUsedProductCollection($product, false);
1310-
if ($salableOnly) {
1311-
$collection = $this->salableProcessor->process($collection);
1312-
}
1313-
$usedProducts = array_values($collection->getItems());
1314-
$this->saveUsedProductsCacheData($product, $usedProducts, $cacheKey);
1307+
$collection = $this->getConfiguredUsedProductCollection($product, false);
1308+
if ($salableOnly) {
1309+
$collection = $this->salableProcessor->process($collection);
13151310
}
1311+
$usedProducts = array_values($collection->getItems());
13161312
$product->setData($dataFieldName, $usedProducts);
13171313
}
13181314

0 commit comments

Comments
 (0)