diff --git a/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php index d1ffb92620746..769e3afc1158f 100644 --- a/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php +++ b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php @@ -415,7 +415,7 @@ protected function _prepareProduct(\Magento\Framework\DataObject $buyRequest, $p ); if ($buyRequest->getSuperGroup()) { $serializedValue = $this->serializer->serialize($buyRequest->getSuperGroup()); - $_result[0]->addCustomOption('super_group', $serializedValue); + $_result[0]->addCustomOption('grouped_options', $serializedValue); } $products[] = $_result[0]; diff --git a/app/code/Magento/GroupedProduct/Model/Quote/Item/CartItemProcessor.php b/app/code/Magento/GroupedProduct/Model/Quote/Item/CartItemProcessor.php index 05a59f42fca02..924630d6987ed 100644 --- a/app/code/Magento/GroupedProduct/Model/Quote/Item/CartItemProcessor.php +++ b/app/code/Magento/GroupedProduct/Model/Quote/Item/CartItemProcessor.php @@ -109,11 +109,11 @@ public function processOptions(CartItemInterface $cartItem): CartItemInterface return $cartItem; } - $superGroup = $cartItem->getOptionByCode(self::SUPER_GROUP_CODE); - $superGroupValues = $superGroup ? $this->jsonSerializer->unserialize($superGroup->getValue()) : null; - if ($superGroupValues) { + $groupedOptions = $cartItem->getOptionByCode('grouped_options'); + $groupedOptionsData = $groupedOptions ? $this->jsonSerializer->unserialize($groupedOptions->getValue()) : null; + if ($groupedOptionsData) { $productOptions = []; - foreach ($superGroupValues as $id => $qty) { + foreach ($groupedOptionsData as $id => $qty) { $productOptions[] = $this->groupedOptionFactory->create(['id' => $id, 'qty' => $qty]); }