工作答案点击收听
ravi.Asyou reweite customer class Mage_Customer_Model_Customer
然后 $this give customer object
在此功能中,如果使用以下代码,您可以获得客户:
$this->getGroupId()
您还需要创建一个客户忘记密码其余密码电子邮件 html 模板并将其定义为 config.xml
Step1: 添加新客户forgot password confirmation mail template
使用this customer group
below code at config.xml
<template>
<email>
<customer_password_forgot_email_template_groupnew translate="label" module="customer">
<label>Forgot Password</label>
<file>account_password_reset_confirmation_new.html</file>
<type>html</type>
</customer_password_forgot_email_template_groupnew>
</email>
</template>
通过这段代码,我添加了 新的电子邮件模板,模板代码是customer_password_forgot_email_template_groupnew
步骤 2:要获取此电子邮件模板,请在 config.xml 外部添加以下代码
<default>
<customer>
<password>
<forgot_email_template_newgroup>customer_password_forgot_email_template_groupnew</forgot_email_template_newgroup>
</password>
</customer>
</default>
Step3:需要调用这个模板at sendPasswordResetConfirmationEmail
的rewrite函数
if($this->getGroupId()==4) <!-- check your group id -->
$this->_sendEmailTemplate('customer/password/forgot_email_template_newgroup', self::XML_PATH_FORGOT_EMAIL_IDENTITY,
array('customer' => $this), $storeId);
}
else{
$this->_sendEmailTemplate(self::XML_PATH_FORGOT_EMAIL_TEMPLATE, self::XML_PATH_FORGOT_EMAIL_IDENTITY,
array('customer' => $this), $storeId);
}
第4步: you to create new html name as account_password_reset_confirmation_new.html at app/locale/yourlanguage/template/email