In this article, we would take a quick look into the quickest way to merge login & registration form, on a single page, i.e. Login Page http://www.example.net/customer/account/login/
1. Changes in Layout(xml) to refer to registration form.
Open ‘customer.xml’ from your theme folder, locate the following tags ‘<customer_account_login translate=”label”>’. It is the layout section, that refers to our page of interest, the default content within the tags should be as follows, if no changes are already made in the section:
The above mentioned content are to be modified as follows(refer the highlighted tags):
2. Adding HTML/Child Content
Open up the following PHTML file from your current/default theme, ‘persistent\customer\form\login.phtml’
add the following line, to place where ever registration form is required:
<?php echo $this->getChildHtml('customer_form_register'); ?>
3. Update redirection
Copy ‘AccountController.php’ from core folder to local folder, locate the function ‘createPostAction()’, at the end of this function replace the following lines with the latter provided line:
$this->_redirectError(Mage::getUrl('*/*/create', array('_secure' => true)));
$this->_redirectError(Mage::getUrl('*/*', array('_secure' => true)));
Clear cache if its enabled, and you are ready to go.