Step 1. Just open customer.xml file in the editor of your choice, for this navigate to the /app/design/frontend/base/default/layout/customer.xml or if you are using the custom template then you will get it /app/design/frontend/default/your_custom_template/layout/customer.xml
Step 2. Search for the content below around (line 93):
<reference name="content"> <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" /> </reference>
Step 3. Now just copy the below content
Step 4. Now open cms.xml file in the editor of your choice, for this navigate to the /app/design/frontend/base/default/layout/cms.xml or if you are using the custom template then you will get it /app/design/frontend/default/your_custom_template/layout/cms.xml
Step 5. Search for the content below:
<cms_page translate="label"> <label>CMS Pages (All)</label> <reference name="content"> <block type="core/template" name="page_content_heading" template="cms/content_heading.phtml"/> <block type="page/html_wrapper" name="cms.wrapper" translate="label"> <label>CMS Content Wrapper</label> <action method="setElementClass"><value>std</value></action> <block type="cms/page" name="cms_page"/> </block> </reference> </cms_page>
Step 6. Now just placed the
<cms_page translate="label"> <label>CMS Pages (All)</label> <reference name="content"> <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" /> <block type="core/template" name="page_content_heading" template="cms/content_heading.phtml"/> <block type="page/html_wrapper" name="cms.wrapper" translate="label"> <label>CMS Content Wrapper</label> <action method="setElementClass"><value>std</value></action> <block type="cms/page" name="cms_page"/> </block> </reference> </cms_page>
Step 7. You have done just refresh your Magento Cache and you browser cache and now there will be a login form on the home page, but there may be some problem with it, the login form will remains same on the home page although you have been login on the Magento frontend. To overcome on this problem just add the below code into the login.phtml file.
Now open login.phtml file in the editor of your choice, for this navigate to the /app/design/frontend/base/default/template/customer/form/ or if you are using the custom template then you will get it /app/design/frontend/default/your_custom_template/template/customer/form/ and add the code to check if you are not logged in then the login form will come on the home below:
Step 8. Add the code on the top of the login.phtml file
<?php if(!Mage::getSingleton('customer/session')->isLoggedIn()): ?> .... .... <?php endif; ?>
Now you are all set and your login form on the home page is ready to use. Hope it helps and Thanks for reading, enjoy the Magentoing.