It's possible via layout XML
In your theme's local.xml
, add the following lines (before </layout>
):
<customer_account_create>
<reference name="customer_form_register">
<action method="setShowAddressFields"><value>1</value></action>
</reference>
</customer_account_create>
If you don't have a customized theme but a bought one, you should create a child theme for customizations like this.
Example
For the Ultimo theme, the theme resides in app/design/frontend/ultimo/default
(Ultimo is the "package", "default" the theme).
You should then create the directory app/design/frontend/ultimo/yourname/layout
and add a file local.xml
there:
<?xml version="1.0"?>
<layout>
<customer_account_create>
<reference name="customer_form_register">
<action method="setShowAddressFields"><value>1</value></action>
</reference>
</customer_account_create>
</layout>
Then configure the custom theme:
Answer to updated question
It's a totally different question now. To allow saving the telephone attribute of the customer in the registration form, you need to tell Magento that it is allowed to be used in that form (this was introduced in Magento 1.5 to prevent customers to modify arbitrary attributes that are not meant to be changed by them).
Write a setup script (as part of a new module, or an existing one if you already have a custom module dedicated to theme and configuration) which contains the following:
Mage::getSingleton('eav/config')
->getAttribute('customer', 'telephone')
->setData('used_in_forms', array('customer_account_create'))
->save();
Source: http://www.schmengler-se.de/en/2011/03/magento-1-5-neue-kundenattribute-im-backend-fomular-sichtbar-machen/
there is no problem is your code you are editing the wrong phtml file. edit this file then changes will be shown.
template/persistent/customer/form/register.phtml
Best Answer
Starting with version CE-1.6 (I think) there is a new module added to Magento.
Mage_Persistent
.This offers a "Remember me" feature when you log in. If this is enabled a cookie is set and the user is allowed to access some personal data (cart, wishlist) without the need to log in.
I don't know why this approach was taken. It would have been easier just to include this functionality directly in the
Mage_Customer
module.Maybe this was intended at first to be available only in Enterprise and that's why is a separate module, but I'm just speculating.
The idea is that this module replaces the templates of some blocks in order to make the
Remember me
functionality available.The replaced templates are the customer login and register and the checkout login and billing steps.
To see what and how is replaced check
/app/design/frontend/base/default/layout/persistent.xml
layout file.