$fallbackPrices =
$this->
buildPrices( $fallbackProducts,
$fallbackPrices,
$context->
getFallbackCustomerGroup() );
// Do not use array_merge here. Since it will reindex the numbers of fallbackPrices.
$prices +=
$fallbackPrices;
} $priceGroups =
$context->
getPriceGroups();
/*
* If one of the products has a configured price group,
* the graduated prices has to be build over the defined price group graduations.
*
* The price group discounts are defined with a percentage discount, which calculated
* on the first graduated price of the product.
*/
foreach ($products as $product) { if (!
$product->
isPriceGroupActive() || !
$product->
getPriceGroup()) { continue;
}