44 private $productOptionRepository;
68 return parent::getValue() +
79 if (!$this->maximalPrice) {
84 $price += $customOptionPrice->getCustomOptionRange(
false);
86 $this->maximalPrice = $this->calculator->getMaxAmount(
$price, $this->product);
97 private function getProductOptionRepository()
99 if (!$this->productOptionRepository) {
101 ProductCustomOptionRepositoryInterface::class
104 return $this->productOptionRepository;
124 if (!$this->minimalPrice) {
125 $price = parent::getValue();
127 $this->loadProductCustomOptions();
130 $price += $customOptionPrice->getCustomOptionRange(
true);
132 $this->minimalPrice = $this->calculator->getAmount(
$price, $this->product);
142 private function loadProductCustomOptions()
144 if (!$this->product->getOptions()) {
146 foreach ($this->getProductOptionRepository()->getProductOptions($this->product) as
$option) {
147 $option->setProduct($this->product);
150 $this->product->setOptions(
$options);
161 if (!$this->priceWithoutOption) {
162 $this->priceWithoutOption = $this->calculator->getAmountWithoutOption(parent::getValue(), $this->product);
174 if (!$this->bundleOptionPrice) {
__construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency)