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

1 Answer 1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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