Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Email Magento更改密码重置电子邮件模板_Email_Templates_Magento_Forgot Password - Fatal编程技术网

Email Magento更改密码重置电子邮件模板

Email Magento更改密码重置电子邮件模板,email,templates,magento,forgot-password,Email,Templates,Magento,Forgot Password,我正在使用magento 1.6.1.0构建一个电子商务网站。我正在使用一个扩展,它将强制用户在进入网站之前登录。一切都很好,问题只在于放弃密码重置链接。该扩展也正在阻止此重置密码链接。我没有得到那个扩展团队的任何支持 今天早上,我在电子邮件模板中修改了magento默认徽标。当时我有一个想法,在创建新帐户时,我们将获得电子邮件、密码的详细信息。为什么我们不能使用该电子邮件模板而不是重置密码链接模板 我尝试从app/locale/en\u US/template/email复制粘贴account

我正在使用magento 1.6.1.0构建一个电子商务网站。我正在使用一个扩展,它将强制用户在进入网站之前登录。一切都很好,问题只在于放弃密码重置链接。该扩展也正在阻止此重置密码链接。我没有得到那个扩展团队的任何支持

今天早上,我在电子邮件模板中修改了magento默认徽标。当时我有一个想法,在创建新帐户时,我们将获得电子邮件、密码的详细信息。为什么我们不能使用该电子邮件模板而不是重置密码链接模板

我尝试从app/locale/en\u US/template/email复制粘贴account\u new.html到account\u password\u reset\u confirmation.html的所有内容

做了这些更改后,我收到了一封电子邮件,邮件是emailL:xxx@mydomain.com密码(&S):

我得到了邮件作为空密码字段


请指导我将忘记密码模板从account\u password\u reset\u confirmation.html更改为account\u new.html,以便我可以直接发送密码。

如果您使用

$customer = Mage::getModel("customer/customer");
         $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
         $customer->getPassword();
这行不通。 密码将在数据库中加密。所以你不能利用它。唯一的方法是生成新密码并在数据库中更新它,然后将新密码发送到用户邮件

生成自定义密码的示例代码

$alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789";     //Random password generation
             $pass = array(); //remember to declare $pass as an array
             $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
             for ($i = 0; $i < 6; $i++) {
                 $n = rand(0, $alphaLength);
                 $pass[] = $alphabet[$n];
             }
             $newpassword =implode($pass);