php - 如何从 Magento 的主页提供忘记密码的链接?

标签 php magento magento-1.6 magento-1.7

我为我的 Magento 站点的主页创建了一个新的模板 phtml 文件 2columns-right-home.phtml。我想在这里提供登录表格。还有“创建新帐户”、“忘记密码”等链接。如何提供链接?

我尝试了以下方法:

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

但是页面没有指向链接。

最佳答案

使用 getUrl 函数获取 customeraccount Controller 的 forgotpassword 操作的链接模块(其 frontName 恰好也是 customer, read more )。这样:

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

More info on getUrl

关于php - 如何从 Magento 的主页提供忘记密码的链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12703399/

相关文章:

e-commerce - 如何在magento中调整媒体图像的大小?

php - PHP exec(),shell_exec(),system(),passthru()在Windows 7/IIS上不起作用

php - 如何在 PHP 中按值对数组进行排序并保留键?

PHP + MySQL + 工具提示

magento - 在 magento head.phtml 中回显产品属性

magento Soap api 仅适用于 https

php - Magento 商店 - 将 nofollow 添加到分层导航

php - Magento - 防止 cron 在导入期间运行

forms - Magento 1.9 block 缓存 - 防止 Mage Catalog block 产品 View 上的表单键缓存

php - Laravel 5 - 调用未定义的方法 Illuminate\Database\Eloquent\Collection::Paginate()