Skip to content

Commit b5ffd67

Browse files
author
bob
committed
Prefixed the cart item product_id extension attributes to fix "Closes #12"
1 parent 8d86070 commit b5ffd67

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Plugin/CartRepositoryPlugin.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function afterGetList(CartRepositoryInterface $subject, $result)
3333
/** @var Item $item */
3434
foreach ($items as $item) {
3535
$extensionAttributes = $this->getCartItemExtensionAttributes($item);
36-
$extensionAttributes->setProductId($item->getProduct()->getId());
36+
$extensionAttributes->setMpProductId($item->getProduct()->getId());
3737
$item->setExtensionAttributes($extensionAttributes);
3838
}
3939
}
@@ -53,4 +53,4 @@ private function getCartItemExtensionAttributes(Item $item)
5353
}
5454
return $extensionAttributes;
5555
}
56-
}
56+
}

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mailplus/mailplus-connector",
33
"description": "The MailPlus connector for magento 2",
44
"type": "magento2-module",
5-
"version": "1.5.0",
5+
"version": "1.6.0",
66
"license": [
77
"OSL-3.0"
88
],

etc/extension_attributes.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</extension_attributes>
1818

1919
<extension_attributes for="Magento\Quote\Api\Data\CartItemInterface">
20-
<attribute code="product_id" type="string">
20+
<attribute code="mp_product_id" type="string">
2121
</attribute>
2222
</extension_attributes>
2323

@@ -32,4 +32,4 @@
3232
<attribute code="updated_at" type="string">
3333
</attribute>
3434
</extension_attributes>
35-
</config>
35+
</config>

0 commit comments

Comments
 (0)