编辑magento电子邮件模板 [英] Edit magento email template
问题描述
我创建了新的交易电子邮件
I have created a new transaction email
使用
系统->配置->交易电子邮件
system->configuration->transaction email
我想显示数据库中的一些信息
I want to show some information from database
宠物名
房间
类型
如何从数据库中获取这些信息并在电子邮件中显示
how to fetch these information from database and show in email
推荐答案
您可以使用模板文件在交易电子邮件中添加其他信息:
you can use template files to add extra information in transaction email:
让我们以新订单模板为例:
Lets take example of new order template:
您会在电子邮件格式/模板文件中找到以下内容:
you will find something like below in you email format/template files:
{{layout handle="sales_email_order_items" order=$order}}
在sales.xml中搜索句柄名称
/app/design/frontend/default/layout/sales.xml
您将在sales.xml文件中得到以下内容:
You will get something like this in you sales.xml files:
<sales_email_order_items>
<block type="sales/order_email_items" name="items" template="email/order/items.phtml">
<action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/order/default.phtml</template></action>
</block>
</sales_email_order_items>
上面的xml可以清楚地表明内容是由email/order/items.phtml模板文件生成的,请打开该文件并添加要包含的内容,最好将此文件放在当前主题中,而不是对其进行更改核心.
Above xml makes it clear that content is being generated by email/order/items.phtml template file, open that files and add the content that you want to include it's better to put this files in your current theme instead of chaning it in core.
这篇关于编辑magento电子邮件模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!