How to add login form to home page in Magento
I found a interesting question on Magento forums. There was a request to add a login page to a home page. I guess somebody wants to show a products only to a registered customers. Here is a quick guide how to do it.
Open customer.xml from layout folder, and locate (around line 91)
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
</reference>
Now open cms.xml and locate (around line 46)
<reference name="content">
<block type="cms/page" name="cms_page"/>
</reference>
Now copy the
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
from customer.xml to cms.xml making it like
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
<block type="cms/page" name="cms_page"/>
</reference>
That’s it. Play with the rest and let us know if this helped someone.
Published in: