How do I provide a forgotten password link on the Magento homepage?

I created a new phtml template file 2columns-right-home.phtml for the home page of my Magento site. I want to provide a registration form here. Also links such as "create a new account", "Forgot your password", etc. How to specify links?

I tried the following:

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

But the page does not link to the link.

+4
source share
3 answers

Use the getUrl function to get a link to the forgotpassword action for the account controller of the customer module (whose frontName will also be customer , read more ). In this way:

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

Additional information getUrl

+8
source
 Mage::helper('customer')->getForgotPasswordUrl() 

take a look

 var_dump(get_class_methods(get_class(Mage::helper('customer')))) 
+2
source

Link for Forgot Password?

 <a href="<?php echo Mage::getBaseUrl(); ?>customer/account/forgotpassword">Forget Password ?</a> 

Link to create an account:

 <a href="<?php echo Mage::getBaseUrl(); ?>customer/account/create">Create Account</a> 
-3
source

Source: https://habr.com/ru/post/1437522/


All Articles