Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #18349 Fixed for 2.3: Incorrect quote_item_id saved on order items during multiple address checkout #19192

10 changes: 10 additions & 0 deletions app/code/Magento/Quote/Model/Quote/Item/ToOrderItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ public function convert($item, $data = [])
'to_order_item',
$item
);
if ($item instanceof \Magento\Quote\Model\Quote\Address\Item) {
$orderItemData = array_merge(
$orderItemData,
$this->objectCopyService->getDataFromFieldset(
'quote_convert_address_item',
'to_order_item',
$item
)
);
}
if (!$item->getNoDiscount()) {
$data = array_merge(
$data,
Expand Down
5 changes: 5 additions & 0 deletions app/code/Magento/Quote/etc/fieldset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@
<aspect name="to_order_address" />
</field>
</fieldset>
<fieldset id="quote_convert_address_item">
<field name="quote_item_id">
<aspect name="to_order_item" />
</field>
</fieldset>
<fieldset id="quote_convert_item">
<field name="sku">
<aspect name="to_order_item" />
Expand Down