Search code examples
magentomagento2

Add billing and shipping address to register form Magento 2


I want to add billing ask user for billing and shipping address when register (in registration form) with a checkbox (shipping address is same). I searched on internet, but I did not found the solution that work for me. I tried to set setShowAddressFields to true, but does not work.


Solution

  • I add these lines in Magento_Customer/layout/customer_account_create.xml:

    <action method="setShowAddressFields">
           <argument name="show.address.fields" xsi:type="boolean">true</argument>
    </action>