ersantosh007/morecheckoutaddressfields

Add Extra Checkout Address Fields In Magento 2


Keywords
magento, magento 2, magento 2 extension, Magento 2 Extension Free, extra checkout field, add extra checkout address field, add-extra-checkout-address-field, extra-checkout-field, magento-2, magento-2-extension, magento-2-extension-free
Licenses
OSL-3.0/AFL-3.0

Documentation

Magento 2 Add More Address Fields to Checkout

  • It renames extra address attribute fieldname, datascope to spAttributes.{attribute_code} LayoutProcessor
  • With a javascript mixin it transports them from spAttributes to extension_attributes
  • Plugin
  • In a event is transport the values from object to object. Example Quote Address to Order Address

Usage:

  1. Add a fieldset.xml
 <scope id="global">
        <fieldset id="more_checkout_billing_address_fields">
            <field name="attribute_code">
                <aspect name="to_order_address" />
                <aspect name="to_customer_address" />
            </field>
        </fieldset>
 </scope>
  1. Add a extensions_attributes.xml
  2. Add a customer_address attribute setup
  3. Add a quote_address field setup
  4. Add a order_address field setup