5

how to add only telephone field from address fields in registration page of magento.

I have found way to enable address fields. But i need only telephone number field alone from address fields in registration.

Please suggest a way to do this.

2 Answers 2

0

Go With the following path :

\app\design\frontend\base\default\template\persistent\customer\form\register.phtml

and comment the if condition from here. :

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

otherwise get the telephone field outside the if condition.

Happy Codding. :)

0

Just add below layout in any layout xml file:

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

Note: Please don't change in core files. Just make a copy of the layout file in theme directory & add above code.

1
  • But It's adding all the address fields to my registration page. I want only telephone number field from address section.
    – Anu
    Commented Apr 27, 2016 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.