I can’t find a clear answer to this one, so worth writing if it helps someone else.
I’m running a site on Magento 1.9. I’d like the customer account login form to appear next to content on a CMS page.
This is usually found on the page,
www.mydomain.com/customer/account/login/referer/[insert referral key]/
As far as I’m aware, the code for the form lies in app/design/frontend/base/default/template/customer/form/login.phtml and the XML for the layout is,
<customer_account_login translate="label">
<label>Customer Account Login Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
</reference>
</customer_account_login>
I’m au fait with CSS, so could probably work out how to style the form to fit the page, but can’t figure out how to neatly get that block of content to sit in the page.
Any ideas?
Thanks for reading!
2
Answers
I figured out what I needed to do.
I created a custom CMS Login form - cmslogin.phtml - cribbed from the existing login form.
I uploaded this to,
and then call the form as a block in the CMS page via,
This seems to have done the job but I now have an issue getting the login form to work properly - I think that's to do with the URL of the CMS Page not including a unique key as the default login page does. I.e.
Any help on that would be appreciated. The code of cmslogin.phtml is:
I think it's to do with the getPostActionUrl() function in there.
Try Below code: