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) {
$data = array_merge(
$data,
$this->objectCopyService->getDataFromFieldset(
'quote_convert_item',
'to_order_item_id',
$item
)
);
}
if (!$item->getNoDiscount()) {
$data = array_merge(
$data,
Expand Down
3 changes: 3 additions & 0 deletions app/code/Magento/Quote/etc/fieldset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@
<field name="qty">
<aspect name="to_order_item" targetField="qty_ordered" />
</field>
<field name="quote_item_id">
<aspect name="to_order_item_id" targetField="quote_item_id" />
mahesh-rajawat marked this conversation as resolved.
Show resolved Hide resolved
</field>
<field name="id">
<aspect name="to_order_item" targetField="quote_item_id" />
</field>
Expand Down