0

您好,当客户点击“忘记密码”时,他们会收到包含重置链接的电子邮件。单击时,这是他们收到的错误。致命错误:在第 750 行的 /home/ishieldz/public_html/store/app/code/core/Mage/Customer/controllers/AccountController.php 中的非对象上调用成员函数 setCustomerId() 任何帮助将不胜感激。谢谢!

/** * 显示重置忘记密码表单 ** 当用户点击密码重置确认电子邮件中的相应链接时,将重定向到此操作 * / public function resetPasswordAction() { $resetPasswordLinkToken = (string) $this->getRequest()->getQuery('token'); $customerId = (int) $this->getRequest()->getQuery('id'); 试试 { $this->_validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken); $this->loadLayout(); // 将接收到的参数传递给重置忘记密码表单 $this->getLayout()->getBlock('resetPassword') ->setCustomerId($customerId) ->setResetPasswordLinkToken($resetPasswordLinkToken); $this->renderLayout(); } catch (Exception $exception) { $this->_getSession()->addError( $this->_getHelper('customer')->__('您的密码重置链接已过期。')); $this->_redirect('/*/忘记密码'); } }

4

3 回答 3

1

如果您在Magento 1.9.1中,这是一个对我有用的解决方案。

如果您的主题不包含任何特定的自定义配置或布局设置,您可以安全地删除位于以下位置的 customer.xml(或只是重命名为 customer1.xml)文件/app/design/frontend/default/<your_theme_package>/<your_theme_name>/layout/customer.xml

如果您删除此文件,magento 将从出厂默认的 magento 主题加载默认配置选项(带有更新)。/app/design/frontend/base/default/layout/customer.xml

请记住通过管理区域刷新/刷新您的 magento 配置,这将强制重新加载 customer.xml 文件。

于 2015-01-22T12:48:23.657 回答
0

登录到magento。进入系统,设计。删除您当前的主题,然后重新添加。

于 2014-08-01T07:12:57.587 回答
0

似乎您调用了一个未声明的对象,所以它可能只是一个变量。验证您是否在 AccountController.php 的第 750 行之前声明您的对象

您必须将包含 setCustomerId() 方法的对象的声明(例如:$ob = new Customer();)放入正在运行的方法中。

于 2014-07-16T17:16:09.983 回答