Skip to content

Commit

Permalink
ENGCOM-4506: Fixes nested array for used products cache key #21754
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Apr 5, 2019
2 parents 557fa02 + 3a17cd2 commit 9d7da2c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,8 @@ public function isPossibleBuyFromList($product)
/**
* Returns array of sub-products for specified configurable product
*
* $requiredAttributeIds - one dimensional array, if provided
*
* Result array contains all children for specified configurable product
*
* @param \Magento\Catalog\Model\Product $product
Expand All @@ -1245,9 +1247,12 @@ public function getUsedProducts($product, $requiredAttributeIds = null)
__METHOD__,
$product->getData($metadata->getLinkField()),
$product->getStoreId(),
$this->getCustomerSession()->getCustomerGroupId(),
$requiredAttributeIds
$this->getCustomerSession()->getCustomerGroupId()
];
if ($requiredAttributeIds !== null) {
sort($requiredAttributeIds);
$keyParts[] = implode('', $requiredAttributeIds);
}
$cacheKey = $this->getUsedProductsCacheKey($keyParts);
return $this->loadUsedProducts($product, $cacheKey);
}
Expand Down

0 comments on commit 9d7da2c

Please sign in to comment.