剖析magento中关于Email模板的设置
public function send()
{
$emailTemplate = Mage::getModel('core/email_template');
// Send all emails from corresponding list
while (!empty($this->_emailInfos)) {
$emailInfo = array_pop($this->_emailInfos);
// Handle "Bcc" recepients of the current email
$emailTemplate->addBcc($emailInfo->getBccEmails());
// Set required design parameters and delegate email sending to Mage_Core_Model_Email_Template
$emailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $this->getStoreId()))
->sendTransactional(
$this->getTemplateId(),
$this->getSender(),
$emailInfo->getToEmails(),
$emailInfo->getToNames(),
$this->getTemplateParams(),
$this->getStoreId()
);
}
return $this;
}
(1) $this->getTemplateId()
<global>
<template>
<email>
<customer_create_account_email_template translate="label" module="customer">
<label>New account</label>
<file>account_new.html</file>
<type>html</type>
</customer_create_account_email_template>
</email>
<template>
</global>
$this->getTemplateId()表示上述配置中的customer_create_account_email_template。
(2) $this->getStoreId()
系统会根据$this->getStoreId()的值调用locale下的不同邮件模板。默认调用app/locale/en_US/template/email下的邮件模板
(3) $this->getTemplateParams()
邮件模板中的变量都来源于此
剖析magento中关于Email模板的设置的更多相关文章
- Dynamics AX 2012 R2 配置E-Mail模板
在AX中使用邮件模板可以,可以让邮件的内容更专业化.下面,跟随Reinhard一起,配置E-Mail模板吧. 进入Organization Administration>Setup>E-m ...
- magento中Model创建以及该Model对于数据库的增删改查
本文是按照magento英文文档照做与翻译的. Model层的实现是mvc框架的一个巨大的部分.它代表了你的应用的数据,或者说大多数应用没有数据是无用的.Magento的Model扮演着一个重要的角色 ...
- Spring中使用Velocity模板
使用Velocity模板 Velocity是一种针对Java应用的易用的模板语言.Velocity模板中没有任何 Java代码,这使得它能够同时被非开发人员和开发人员轻松地理解.Velocity的用户 ...
- VS2013中的MVC5模板部署到mono上的艰辛历程
部署环境:CentOS7 + Mono 3.10 + Jexus 5.6 在Xamarin.Studio创建的asp.net项目,部署过程非常顺利,没有遇到什么问题:但在VS2013中创建的asp.n ...
- Win 10 开发中Adaptive磁贴模板的XML文档结构,Win10 应用开发中自适应Toast通知的XML文档结构
分享两篇Win 10应用开发的XML文档结构:Win 10 开发中Adaptive磁贴模板的XML文档结构,Win10 应用开发中自适应Toast通知的XML文档结构. Win 10 开发中Adapt ...
- Django中如何查找模板
参考:http://my.oschina.net/zuoan001/blog/188782 Django的setting中有关找模板的配置有如下两个: TEMPLATE_LOADERS TEMPLAT ...
- ArcGIS API for Silverlight代码中使用Template模板
原文:ArcGIS API for Silverlight代码中使用Template模板 在项目开发中,会遇到点选中聚焦闪烁效果,但是因为在使用Symbol的时候,会设置一定的OffSetX和OffS ...
- Magento中,调用静态块的几种方法
在后台创建一个order_form静态块Block Title :Order FormIdentifier :order_formStatus :EnabledContent :自定义内容 1.如果要 ...
- Magento中直接使用SQL语句
原理: magento是基于Zend Framework的,所以底层用的还是zend的zend db 在文件app/code/core/Mage/Catalog/model/Resource/Eav ...
随机推荐
- jquery实现导航栏鼠标点击后实行背景高亮,点击离开恢复(超级简单!!!!),jquery导航栏
1.header部分要引入Jquery <asp:Content ID="HeaderContent" runat="server" ContentPla ...
- Oracle EBS-SQL (OM-2):检查OM常用表
--多语言视图 ALTER SESSION SET NLS_LANGUAGE=AMERICAN ; --组织化视图 BEGIN FND_CLIENT_INFO.set_org_context(218) ...
- 【PAT】1025. PAT Ranking (25)
题目链接:http://pat.zju.edu.cn/contests/pat-a-practise/1025 题目描述: Programming Ability Test (PAT) is orga ...
- 基础巩固(二)- log4j的使用
日志是应用软件中不可缺少的部分,Apache的开源项目log4j是一个功能强大的日志组件,提供方便的日志记录.在apache网站:jakarta.apache.org/log4j 可以免费下载到Log ...
- [Leetcode][Python]44:Wildcard Matching
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com' 44:Wildcard Matchinghttps://oj.leetcode ...
- Zepto,Zepto API 中文版,Zepto 中文手册,Zepto API,Zepto API 中文版,Zepto 中文手册,Zepto API 1.0, Zepto API 1.0 中文版,Zepto 1.0 中文手册,Zepto 1.0 API-translate by yaotaiyang
Zepto,Zepto API 中文版,Zepto 中文手册,Zepto API,Zepto API 中文版,Zepto 中文手册,Zepto API 1.0, Zepto API 1.0 中文版,Z ...
- crm2011js操作选项卡和节点
CRM窗口选项卡的操作 crm2011节点的操作
- linux下的DNS
Linux下设置DNS的位置主要是, 1网卡设置配置文件里面DNS服务器地址设置;2 hosts文件指定 3.系统默认DNS服务器地址设置/etc/resolv.conf文件修改 生效顺序是: 1 h ...
- DoNet开源项目-基于Amaze UI的点餐系统
帮朋友做的点餐系统,主要是为了让顾客在餐桌上,使用微信扫描二维码,就可以直接点菜,吃完使用微信付款. 系统演示地址,账户名和密码均为:admin.(请不要删除admin用户) GitHub Clone ...
- 蜗牛爱课- iOS中plist的创建,数据写入与读取
iOS中plist的创建,数据写入与读取功能创建一个test.plist文件-(void)triggerStorage{ NSArray *paths=NSSearchPathForDirect ...