/** * Get Price Amount object * * @return AmountInterface */ public function getAmount() { if (null === $this->amount) { $this->amount = $this->calculator->getMinRegularAmount($this->getValue(), $this->product); } return $this->amount; }
/** * Get Price Amount object * * @return AmountInterface */ public function getAmount() { if (null === $this->amount) { $price = $this->getValue(); if ($this->product->getPriceType() == Price::PRICE_TYPE_FIXED) { /** @var \Magento\Catalog\Pricing\Price\CustomOptionPrice $customOptionPrice */ $customOptionPrice = $this->priceInfo->getPrice(CustomOptionPrice::PRICE_CODE); $price += $customOptionPrice->getCustomOptionRange(true); } $this->amount = $this->calculator->getMinRegularAmount($price, $this->product); } return $this->amount; }