Enable Address Fields in Magento Customer Registration Forms

In order to enable address fields in Magento customer registration forms you only need to enable the attribute setShowAddressField.

To do so either add the following in your template or in the base local.xml (/app/design/frontend/base/default/layout/local.xml):

  <reference name="customer_form_register"> 
    <action method="setShowAddressFields">

As always, make sure to reload your cache afterwards. This setting will enable to execution of

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

in register.phtml (/app/design/frontend/base/default/template/customer/form/register.phtml). That’s it 🙂

You may also like...

6 Responses

  1. Thanks for the tip! Good to see it is this easy!

  2. suresh says:

    Nice , very usefull

  3. Sabina Oražem says:

    Thank you, this is great. 😉

  4. Patrick says:

    Great Tip, worked a treat, I had a little issue as I needed to apply a child theme as we run multi-store, however once i copied the local.xml to the child theme and added the above code it enabled for that store no problem.

    One question though, in the situation above can you just add a new local.xml with the extra code into your child theme or do you need to copy the whole thing, i.e. will it read the snippet in the child theme and the the rest from the main theme or do you need the whole of layout.xml in the child.

  5. Bharti says:

    Great !! Thanks for the help 🙂 .

  6. majid says:

    how just get telephone field in customer register page?
    this solution show all address fields but i just need telephone

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.