PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, November 10, 2022

[FIXED] How to give forgot password link from home page in Magento?

 November 10, 2022     magento, magento-1.6, magento-1.7, php     No comments   

Issue

I have created a new template phtml file 2columns-right-home.phtml for home page of my Magento site. I want to give login form here. Also the links like 'create new account', 'Forgot Password', etc. How to give the links?

I tried the following:

<a href="<?php echo $this->getForgotPasswordUrl() ?>">Forgot password?</a>

But the page is not directing to the link.


Solution

Use the getUrl function to get the link to the forgotpassword action for the account controller of the customer module (whose frontName happens to also be customer, read more). As so:

<a href="<?php echo Mage::getUrl('customer/account/forgotpassword') ?>">Forgot password?</a>

More info on getUrl



Answered By - Josh Davenport-Smith
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing