Magento: Show Billing-Shipping Address in Customer Signup-Registration page

Here are some ways (2 ways below) to show customer address information in registration page.

When you fill up the address fields and signup then both your billing and shipping addresses are filled up.

Here is how to enable address fields in signup page:-

1) First way [EASY]

– Open template/customer/form/register.phtml
– Just above this line:


 <?php if($this->getShowAddressFields()): ?>

Write this line:


 <?php $this->setShowAddressFields(true); ?>

– So, the code should look like this:


 <?php $this->setShowAddressFields(true); ?>
 <?php if($this->getShowAddressFields()): ?>

2) Second way [STANDARD]

– Open layout/customer.xml
– Add this line inside customer_account_create node:


<action method="setShowAddressFields"><value>true</value></action>

– So, the xml code will look like this:


<customer_account_create translate="label">
<label>Customer Account Registration Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>

<reference name="root">
    <action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
    <block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
        <action method="setShowAddressFields"><value>true</value></action>
        <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
            <label>Form Fields Before</label>
        </block>
    </block>
</reference>
</customer_account_create>

You should be able to show customer address fields on registration by using any of the above two methods.

Hope it helps. Thanks.