客户的密码未显示在电子邮件模板magento 1.9.1.0中 [英] customer's password not displayed in email templates magento 1.9.1.0

查看:100
本文介绍了客户的密码未显示在电子邮件模板magento 1.9.1.0中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在电子邮件(account_new.html)中显示密码时遇到问题

I have a problem with displaying the password in email (account_new.html)

<strong>Email</strong>: {{var customer.email}}<br/>
<strong>Password</strong>: {{htmlescape var=$customer.password}}<p>

注册后的密码未显示在模板中. 我怎样才能解决这个问题?我使用magento 1.9.1.0

After registration password is not displayed in the template. How can I fix this? I use magento 1.9.1.0

推荐答案

Magento 1.9版本无法在电子邮件中发送密码. 而不在{{htmlescape var=$customer.password}}

Magento 1.9 version has problem to send password in emails. and not set var values under {{htmlescape var=$customer.password}}

有一种通过电子邮件发送密码的解决方案

There is one solution to send password in email

打开核心文件,或根据需要添加AccountController.php, 在第285行找到函数createPostAction()或找到

Open the core file or extend as you like AccountController.php, find the function createPostAction() on line 285 or find

$customer->cleanPasswordsValidationData();

只是这样评论

// $customer->cleanPasswordsValidationData();

也可以在其他地方执行此操作,如809、954行

also do it in other places as on line 809, 954

现在它将密码发送给客户新的帐户电子邮件.

now it sends the password to customer new account email.

打开或扩展自定义模型文件

open or extend the custom model file

magento \ app \ code \ core \ Mage \ Customer \ Model \ Customer.php

magento\app\code\core\Mage\Customer\Model\Customer.php

找到功能

public function cleanPasswordsValidationData()
{
    $this->setData('password', null);
    $this->setData('password_confirmation', null);
    return $this;
} 

注释// $this->setData('password', null);

public function cleanPasswordsValidationData()
{
    // $this->setData('password', null);
    $this->setData('password_confirmation', null);
    return $this;
} 

这篇关于客户的密码未显示在电子邮件模板magento 1.9.1.0中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆