11 use Magento\Quote\Api\Data\ProductOptionExtensionFactory;
12 use Magento\Quote\Model\Quote\ProductOptionFactory;
76 &&
$cartItem->getProductOption()->getExtensionAttributes()
77 &&
$cartItem->getProductOption()->getExtensionAttributes()->getCustomOptions()) {
97 $this->updateOptionsValues(
$options);
100 : $this->productOptionFactory->create();
105 : $this->extensionFactory->create();
107 $extensibleAttribute->setCustomOptions(
$options);
123 ? $this->serializer->unserialize(
$cartItem->getOptionByCode(
'info_buyRequest')->getValue())
136 protected function updateOptionsValues(array &
$options)
140 $option = $this->customOptionFactory->create();
158 private function processFileOptionValue(array
$optionValue)
178 private function processDateOptionValue(array
$optionValue)
182 $closure =
function ($key) {
183 return $key ===
'date_internal';
195 private function getUrlBuilder()
197 if ($this->urlBuilder ===
null) {
199 ->get(\
Magento\Catalog\Model\Product\Option\UrlBuilder::class);
201 return $this->urlBuilder;
processOptions(CartItemInterface $cartItem)
__construct(\Magento\Framework\DataObject\Factory $objectFactory, \Magento\Quote\Model\Quote\ProductOptionFactory $productOptionFactory, \Magento\Quote\Api\Data\ProductOptionExtensionFactory $extensionFactory, \Magento\Catalog\Model\CustomOptions\CustomOptionFactory $customOptionFactory, \Magento\Framework\Serialize\Serializer\Json $serializer=null)
convertToBuyRequest(CartItemInterface $cartItem)
foreach($product->getExtensionAttributes() ->getBundleProductOptions() as $option) $buyRequest
getOptions(CartItemInterface $cartItem)