![](/img/trans.png)
[英]How Can I get Customer telephone Number for verification/Send SMS Notification as like as email notification for Magento new Customer registration?
[英]How to Send custom email for customer registration in magento?
我已经创建了用于customer registration
的自定义模板,但是在注册客户时我不知道如何调用它。
我创建了一个自定义电子邮件模板,如下所示:
<template>
<email>
<vendor_suggestions_email_template translate="label">
<label>Vendor Suggestions</label>
<file>vendor_suggestions.html</file>
<type>html</type>
</vendor_suggestions_email_template >
</email>
</template>
我的自定义电子邮件模板正在管理面板中加载,我已经检查了它。 现在,我想致电此电子邮件进行customer registration
。 因此,我必须将我的客户模型从mage/customer/model/customer.php
文件覆盖到本地客户模块。
这是用于发送电子邮件以进行customer registration
的客户模型代码
const XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template';
public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeId = '0')
{
$types = array(
'registered' => self::XML_PATH_REGISTER_EMAIL_TEMPLATE, // welcome email, when confirmation is disabled
'confirmed' => self::XML_PATH_CONFIRMED_EMAIL_TEMPLATE, // welcome email, when confirmation is enabled
'confirmation' => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE, // email with confirmation link
);
if (!isset($types[$type])) {
Mage::throwException(Mage::helper('customer')->__('Wrong transactional account email type'));
}
if (!$storeId) {
$storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());
}
$this->_sendEmailTemplate($types[$type], self::XML_PATH_REGISTER_EMAIL_IDENTITY,
array('customer' => $this, 'back_url' => $backUrl), $storeId);
return $this;
}
现在,我不知道如何发送客户电子邮件模板以进行customer registration
。 我真的不明白上面的代码如何在客户注册中发送电子邮件以及如何触发我的自定义电子邮件模板。
谁能帮我????
您可以在后端的“ System >> Transactional Email
部分中加载自定义模板。
然后,您需要从以下位置分配该电子邮件模板以进行客户注册
System >> Configuration >> Customer Configuration
在“创建新帐户选项”框中,在“ Default Welcome Email
选择框中选择自定义电子邮件模板,然后保存配置。 然后Magento将使用您的自定义电子邮件模板进行客户注册。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.