skip to Main Content

Below I have a shipping address form of checkout page and I would like to add another field(P.O. Box) in this form. I tried to look it up every forums and most of the answers were based on overriding MagentoCheckoutBlockCheckoutLayoutProcessor. I checked app/code/company/Checkout/etc/di.xml but wasn’t referencing layoutprocessor.

I am still confused from where this form is getting values from MagentoQuoteApiDataAddressInterface or MagentoCheckoutviewfrontendlayoutcheckout_index_index.xml

enter image description here

how can I add custom field to this form? Can anyone give me any suggestions? It would be really helpful appreciate it

2

Answers


  1. Chosen as BEST ANSWER

    So after referring to lot of blogs I believe there are only 2 ways of creating custom field in which could be either by extending MagentoCustomerApiDataAddressInterface or by extending MagentoCheckoutBlockCheckoutLayoutProcessor with the plugin created in app/code/vendor/Checkout/etc/di.xml. Also I noticed that the only purpose of MagentoCheckoutviewfrontendlayoutcheckout_index_index.xml was to load the whole chunk in a single block rendering in one page as it could be used for adding validation.


  2. you should check MagentoCustomerApiDataAddressInterface to add a new field to the address.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search