Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

How do I add address to the registration form?

  1. #1
    New member
    Join Date
    Mar 2016
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do I add address to the registration form?

    You would think enabling the address during the customer registration form would be a simple process but I can't seem to locate the answer. I have tried a few suggestions I have found just searching around on the internet but nothing has worked. I had an extension that did it for me but since it was updated to 1.9 that extension no longer works. How do I add the address as a required field in the registration page when a customer goes to create an account on my website?

    Fashion X

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Jun 2016
    Location
    Bhavnagar, Gujarat, India
    Posts
    546
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

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

    To enable, either add the following in your template or in the base local.xml (/app/design/frontend/[Your Theme]/layout/local.xml):


    <customer_account_create>
    <reference name="customer_form_register">
    <action method="setShowAddressFields">
    <param>true</param>
    </action>
    </reference>
    </customer_account_create>

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

    1
    <?php if($this->getShowAddressFields()): ?>
    in register.phtml (/app/design/frontend/base/default/template/customer/form/register.phtml).

  3. #3
    Junior Member
    Join Date
    Aug 2016
    Posts
    72
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    Add this code for registration,


    <customer_account_create>
    <reference name="customer_form_register">
    <action method="setShowAddressFields">
    <param>true</param>
    </action>
    </reference>
    </customer_account_create>

    You have to change this <?php if($this->getShowAddressFields()): ?>

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

    after this you have to reload your page.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •