Code for adding extra fields at customer registration in Magento 1 - Magesan

Code for adding extra fields at customer registration in Magento 1

Code for adding extra fields at customer registration in Magento 1

Go To Your Themes => Local.xml
At There Paste This Code :-
    <customer_account_create>
      <reference name="customer_form_register">
          <action method="setShowAddressFields">
            <param>true</param>
          </action> 
      </reference>
    </customer_account_create>

Then after for saving these datas into database.
Go to register.phtml (Path can be :- app/design/frontend/default/bootstrap/template/opc/customer/form/register.phtml

In register.phtml file Add this line :- 
  <?php if($this->getShowAddressFields()): ?>
      <input type="hidden" name="create_address" id="create_address" value="1" />
  <?php endif; ?>
  
  -> Add just above the </form> tag ended.

Leave a Reply

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

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>