Friday, April 20, 2012

Add Address fields in customer registration

To show all address fields in create account page for customer,you have to comment following lines in:


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


replace line no:77
from:
  <?php if($this->getShowAddressFields()): ?>
to
  <?php / /if($this->getShowAddressFields()): ?>


replace line no:149
from:
  <?php endif; ?>
to
  <?php // endif; ?>


As well,to get the list of states,you need to comment same line in java script too.

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


replace line no:178
from:
  <?php if($this->getShowAddressFields()): ?>
to
  <?php / /if($this->getShowAddressFields()): ?>

replace line no:180
from:
  <?php endif; ?>
to
  <?php // endif; ?>

Now,You can see address fields in,create account form.


If you are still not able to see the address fields in create account form,means you have activate persistent cart.In that case you need to comment the same lines in
\magento\app\design\frontend\base\default\template\persistent\customer\form\register.phtml

3 comments:

  1. hi
    this is not working ,i have imapleted ur guideline but address is not showing

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method... magento 2

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...