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
 - Merge Pull Request #21754 from electricpulp/magento2:electricpulp-patch-fix-used-products-cache-key
 - Merged commits:
   1. 8029be3
   2. c819cc0
  • Loading branch information
magento-engcom-team committed Apr 5, 2019
2 parents bb46a2f + c819cc0 commit 3a17cd2
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 3a17cd2

Please sign in to comment.