46 private $configurableOptionsProvider;
51 private $lowestPriceOptionsProvider;
62 \
Magento\Framework\Pricing\SaleableInterface $saleableItem,
71 $this->lowestPriceOptionsProvider = $lowestPriceOptionsProvider ?:
80 if (!isset($this->values[$this->product->getId()])) {
81 $this->values[$this->product->getId()] = $this->priceResolver->resolvePrice($this->product);
84 return $this->values[$this->product->getId()];
100 if (
null === $this->maxRegularAmount) {
115 $childPriceAmount =
$product->getPriceInfo()->getPrice(self::PRICE_CODE)->getAmount();
116 if (!$maxAmount || ($childPriceAmount->getValue() > $maxAmount->getValue())) {
117 $maxAmount = $childPriceAmount;
128 if (
null === $this->minRegularAmount) {
142 foreach ($this->lowestPriceOptionsProvider->getProducts($this->product) as
$product) {
143 $childPriceAmount =
$product->getPriceInfo()->getPrice(self::PRICE_CODE)->getAmount();
144 if (!$minAmount || ($childPriceAmount->getValue() < $minAmount->getValue())) {
145 $minAmount = $childPriceAmount;
158 return $this->getConfigurableOptionsProvider()->getProducts($this->product);
165 private function getConfigurableOptionsProvider()
167 if (
null === $this->configurableOptionsProvider) {
169 ->get(ConfigurableOptionsProviderInterface::class);
171 return $this->configurableOptionsProvider;
__construct(\Magento\Framework\Pricing\SaleableInterface $saleableItem, $quantity, \Magento\Framework\Pricing\Adjustment\CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, PriceResolverInterface $priceResolver, LowestPriceOptionsProviderInterface $lowestPriceOptionsProvider=null)