We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    Please follow below steps to assign order item value from the quote item.

    step 1) Create a di.xml under app/code/Vendor/Module/etc/di.xml

    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="MagentoQuoteModelQuoteItemToOrderItem">
            <plugin name="vendor_mymodule_sales_quote_item_order_item" type="VendorModulePluginSetOrderItemValue" />
        </type>    
    </config>

    step 2) Create the plugin file app/code/Vendor/Module/Plugin/SetOrderItemValue.php

    <?php
    namespace VendorModulePlugin;
    use MagentoFrameworkSerializeSerializerInterface;
    
    class SetOrderItemValue
    {
        public function aroundConvert(MagentoQuoteModelQuoteItemToOrderItem $subject, callable $proceed, $quoteItem, $data)
        {
            $orderItem = $proceed($quoteItem, $data);
            $quotecustomattribute = $quoteItem->getMyCustomAttribite();
            $orderItem->setMyCustomAttribite($quotecustomattribute);
            return $orderItem;
        }
    }

     

    field_5bfb909c5ccae

      Get a Free Quote