I want to show both the billing address and shipping address form in a user-registration page and save the data .
1 Answer
display address fields using customer_account_create.xml as below:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer_form_register">
<arguments>
<argument name="show_address_fields" xsi:type="boolean">true</argument>
</arguments>
</referenceBlock>
</body>
In template file already value set as 1 for both default_billing and default_shipping fields as 1, so by default billing and shipping, both addresses got to save the as same address.
vendor/magento/module-customer/view/frontend/templates/form/register.phtml
<input type="hidden" name="default_billing" value="1">
<input type="hidden" name="default_shipping" value="1">
-
here I can only save one address the address as default billing and default shipping i want two forms that one store as default billing and another one default shipping– jithinFeb 20, 2020 at 5:15
-
-