You made it all the way down here so you must have enjoyed this post! You may also like:

How To Connect Google Analytics 4 To Magento 2 Bojan Mareljic
Bojan Mareljic, | 36

How To Connect Google Analytics 4 To Magento 2

3 best open-source eCommerce platforms in 2021 Zrinka Antolovic
Zrinka Antolovic, | 8

3 best open-source eCommerce platforms in 2021

How to add login form to home page in Magento Branko Ajzele
Branko Ajzele, | 6

How to add login form to home page in Magento

17 comments

  1. Hi, It did not work well when i followed your instructions what you told. Please kindly help me out.

  2. This method always redirects user to the account page even if it’s turned off inside the Magento configuration. Is there any form action method that I can use other than customer/account/loginPost? Because when I’m using it, I’m getting redirected to the customer/account page. πŸ™

  3. Hi
    i have to implement same functionality in my web site, i am using enterprise edition,
    u explained with base theme, which files do i need to change if i use enterprise edition
    i really appreciate your help

    thanks

  4. subject :β€”- Including top links(login/logout sign up under Account as dropdown select values)

    I want to add login signup and login/out options inside account i.e account as dropdown menu where login , sign up and login/logout should be inside Account dropdown. Can please somebody guide me how to do this.. I tried but is default . .. Please help.. such that it should not effect the functionality . . . ..

    regards

    Pradeep

  5. So, I have the Full-Width Responsive Grayscale theme installed, and I went trhough the step with no success. Can you help me out regarding what files would be altered instead? I figure there might be some alteration to local.xml, ou a custom links phtml file…

  6. Hi, Finch.

    One way would be to compare the title of your links before they get printed to html with the title of your ‘Log in’ link, e.g.

    if($_link->getTitle() == 'Log In')

    Place the condition inside the ‘else’ (lines 8-13), depending on the construction of your links.

  7. I also tried this yesterday but it didn’t work. Good thing the post is updated. Now it works. Thanks Petar Sambolek! πŸ™‚

    Btw, what if my login form is not in the last li? And not in the first li? How can I make the dropdown drop?

  8. Sorry, everyone. I seem to have forgotten one more step that needs to be done in order for login box to show.

    The article has been updated, just edit the links.phtml template as shown above.

  9. Please don’t do this on your website unless your site is completely on SSL/HTTPS. Having a login form displayed on an http page is still vulnerable to a type of man in the middle attack even if the login form points to a secure/https URL. Granted the vulnerability is much less severe than submitting to an unencrypted endpoint.Jason Coco’s answer on this SO post is probably the best explanation http://stackoverflow.com/questions/274274/is-it-secure-to-submit-from-a-http-form-to-https

  10. Very useful article. Even though this feature looks simple but can be useful in many ways. We have recently placed this feature in our client website and he is really impressed. Petar, i’ll give full credit to you because this post has really helped me a lot. Thanks πŸ™‚

  11. I really liked this Petar. It looks simple but a valuable feature. We recently had this requirement for a B2B Magento website and a drop down login is a valuable UX feature.

  12. I never thought this can be done using CSS only. I thought I needed javascript.

    This saved me $25.00. I’m about to buy the magento quick login/dropdown login extension by plazathemes at magento connect. Good thing I read this post before clicking the buy now button. Haha! You just posted this last April 16, 2014! Lucky me, a recent post, for my needs. πŸ˜€

  13. Hi, Marius.
    Thank you for your insight.

    I agree that the block type of core/template can be limiting sometimes – you should always try to adopt your template to an existing block the template is based on, or create a brand new block.

    There are a few ways of doing this differently, but since there is only one situation in which this block type presents a problem, it doesn’t present a major issue πŸ™‚

  14. Nice and simple, but to nitpick, I must say you shouldn’t use `core/template`. I understand the reason you use it, but in case I decide to temporarily disable the output of the `Mage_Customer` module, the login form will still be there. But this is not a big issue. Like I said..I was just nitpicking. This can be fixed by adding in the template an if statement: if (Mage::helper(‘core’)->isModuleOutputEnabled(‘Mage_customer’)) {…}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.

Tell us about your project

Drop us a line. We'd love to know more about your project.