How to add login form on home page in Magento

I found a interesting question on Magento forums. Some of the clients would like to see the login box on home page. Here is a quick howto.

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.

One Response to “How to add login form on home page in Magento”

  1. Mike Says:

    Thanks for posting this….:)


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>