0

I have added a custom field in checkout page shipping address, it is saving in the database, but not displaying sales orders admin section in magento2. but it is saving to billing address section.

Can anyone help me how to resolve this?

Please find the screenshot below:

enter link description here

Thanks

0

You can save your custom field in sales_order_grid using di.xml

<virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid" type="Magento\Sales\Model\ResourceModel\Grid">
    <arguments>
        <argument name="columns" xsi:type="array">
            <item name="custom_field" xsi:type="string">sales_order.custom_field</item>
        </argument>
    </arguments>
</virtualType>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.