/** @var ShopContextInterface $context */
foreach ($contexts as $context) { $prices =
$this->
fetchPrices($products,
$context);
$key =
$context->
getCurrentCustomerGroup()->
getKey();
foreach ($products as $product) { if (!
isset($configurations[$product->
getNumber()]) || !
isset($prices[$product->
getId()])) { continue;
} $configuration =
$configurations[$product->
getNumber()];
$groups =
$this->
getFilteredGroups($configuration,
$variantFacet);
if (empty($groups)) { continue;
} $combinations = self::
arrayCombinations($groups);
$combinationPrices[$key][$product->
getNumber()] =
$this->
getCombinationPrices( $configuration,
$prices[$product->
getId()],
$combinations,