我为我的 Magento 站点的主页创建了一个新的模板 phtml 文件 2columns-right-home.phtml。我想在这里提供登录表格。还有“创建新帐户”、“忘记密码”等链接。如何提供链接?
我尝试了以下方法:
<a href="<?php echo $this->getForgotPasswordUrl() ?>">Forgot password?</a>
但是页面没有指向链接。
最佳答案
使用 getUrl
函数获取 customer
的 account
Controller 的 forgotpassword
操作的链接模块(其 frontName
恰好也是 customer
, read more )。这样:
<a href="<?php echo Mage::getUrl('customer/account/forgotpassword') ?>">Forgot password?</a>
关于php - 如何从 Magento 的主页提供忘记密码的链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12703399/