diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php
index d1df064f57140..42f5289d2109a 100644
--- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php
+++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php
@@ -1182,7 +1182,7 @@ private function removePlacedItemsFromQuote(array $shippingAddresses, array $pla
{
foreach ($shippingAddresses as $address) {
foreach ($address->getAllItems() as $addressItem) {
- if (in_array($addressItem->getId(), $placedAddressItems)) {
+ if (in_array($addressItem->getQuoteItemId(), $placedAddressItems)) {
if ($addressItem->getProduct()->getIsVirtual()) {
$addressItem->isDeleted(true);
} else {
@@ -1232,7 +1232,7 @@ private function searchQuoteAddressId(OrderInterface $order, array $addresses):
$item = array_pop($items);
foreach ($addresses as $address) {
foreach ($address->getAllItems() as $addressItem) {
- if ($addressItem->getId() == $item->getQuoteItemId()) {
+ if ($addressItem->getQuoteItemId() == $item->getQuoteItemId()) {
return (int)$address->getId();
}
}
diff --git a/app/code/Magento/Quote/Model/Quote/Item/ToOrderItem.php b/app/code/Magento/Quote/Model/Quote/Item/ToOrderItem.php
index 32687499274f8..6192d3471ccb0 100644
--- a/app/code/Magento/Quote/Model/Quote/Item/ToOrderItem.php
+++ b/app/code/Magento/Quote/Model/Quote/Item/ToOrderItem.php
@@ -48,6 +48,8 @@ public function __construct(
}
/**
+ * Convert quote item(quote address item) into order item.
+ *
* @param Item|AddressItem $item
* @param array $data
* @return OrderItemInterface
@@ -63,6 +65,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,
diff --git a/app/code/Magento/Quote/etc/fieldset.xml b/app/code/Magento/Quote/etc/fieldset.xml
index 55ec76a647fcd..85ee20c7f8520 100644
--- a/app/code/Magento/Quote/etc/fieldset.xml
+++ b/app/code/Magento/Quote/etc/fieldset.xml
@@ -186,6 +186,11 @@