10 use Magento\Bundle\Api\Data\BundleOptionInterfaceFactory;
58 if (
$cartItem->getProductOption() &&
$cartItem->getProductOption()->getExtensionAttributes()) {
59 $options =
$cartItem->getProductOption()->getExtensionAttributes()->getBundleOptions();
64 foreach (
$option->getOptionSelections() as $selection) {
81 if (
$cartItem->getProductType() !== \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
89 if (empty($optionSelections)) {
92 $optionSelections = is_array($optionSelections) ? $optionSelections : [$optionSelections];
105 $cartItem->setProductOption($this->productOptionFactory->create());
$productOptionExtensionFactory
__construct(\Magento\Framework\DataObject\Factory $objectFactory, QuoteApi\ProductOptionExtensionFactory $productOptionExtensionFactory, BundleOptionInterfaceFactory $bundleOptionFactory, QuoteApi\ProductOptionInterfaceFactory $productOptionFactory)
processOptions(CartItemInterface $cartItem)
convertToBuyRequest(CartItemInterface $cartItem)