product->setQty($this->quantity); $this->bundleOptions = $bundleOptions; } /** * {@inheritdoc} */ public function getValue() { if (null === $this->value) { $this->value = $this->bundleOptions->calculateOptions($this->product); } return $this->value; } /** * Get Options with attached Selections collection. * * @return \Magento\Bundle\Model\ResourceModel\Option\Collection */ public function getOptions() : \Magento\Bundle\Model\ResourceModel\Option\Collection { return $this->bundleOptions->getOptions($this->product); } /** * Get selection amount. * * @param \Magento\Bundle\Model\Selection $selection * @return \Magento\Framework\Pricing\Amount\AmountInterface */ public function getOptionSelectionAmount($selection) : \Magento\Framework\Pricing\Amount\AmountInterface { return $this->bundleOptions->getOptionSelectionAmount( $this->product, $selection, true ); } /** * Get minimal amount of bundle price with options. * * @return \Magento\Framework\Pricing\Amount\AmountInterface */ public function getAmount() : \Magento\Framework\Pricing\Amount\AmountInterface { return $this->calculator->getOptionsAmount($this->product); } }