Magento 1 – How to Add Address Field in Registration Form

customer-addressmagento-1register

To enable the address field in Registration form, I added

<action method="setShowAddressFields">

  <param>true</param>

</action> 

in base/default/layout/customer & in base/default/layout/persistent
Also i tried giving this piece of code in local.xml. But none worked. Can anyone please tell me what should be done or where i went wrong?

Best Answer

Try this Before that take Backup

Don't Edit CORE FILE

/app/design/frontend/base/default/layout/local.xml)
<customer_account_create> 
  <reference name="customer_form_register"> 
    <action method="setShowAddressFields">
      <param>true</param>
    </action> 
  </reference>
</customer_account_create>

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

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