Skip to content

Commit c936161

Browse files
change super_group to grouped_options
1 parent be84eb1 commit c936161

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ protected function _prepareProduct(\Magento\Framework\DataObject $buyRequest, $p
415415
);
416416
if ($buyRequest->getSuperGroup()) {
417417
$serializedValue = $this->serializer->serialize($buyRequest->getSuperGroup());
418-
$_result[0]->addCustomOption('super_group', $serializedValue);
418+
$_result[0]->addCustomOption('grouped_options', $serializedValue);
419419
}
420420

421421
$products[] = $_result[0];

app/code/Magento/GroupedProduct/Model/Quote/Item/CartItemProcessor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ public function processOptions(CartItemInterface $cartItem): CartItemInterface
109109
return $cartItem;
110110
}
111111

112-
$superGroup = $cartItem->getOptionByCode(self::SUPER_GROUP_CODE);
113-
$superGroupValues = $superGroup ? $this->jsonSerializer->unserialize($superGroup->getValue()) : null;
114-
if ($superGroupValues) {
112+
$groupedOptions = $cartItem->getOptionByCode('grouped_options');
113+
$groupedOptionsData = $groupedOptions ? $this->jsonSerializer->unserialize($groupedOptions->getValue()) : null;
114+
if ($groupedOptionsData) {
115115
$productOptions = [];
116-
foreach ($superGroupValues as $id => $qty) {
116+
foreach ($groupedOptionsData as $id => $qty) {
117117
$productOptions[] = $this->groupedOptionFactory->create(['id' => $id, 'qty' => $qty]);
118118
}
119119

0 commit comments

Comments
 (0)