我正在尝试为自定义模块制作交易电子邮件。我的模块需要有三个默认电子邮件。一个用于通知预订请求被发送以进行审核,另外两个用于成功和失败。当我试图发送预订请求的电子邮件时,它完全成功发送,但当我尝试为成功或失败时,它显示我跟随错误:无效的交易电子邮件代码:数组
这是config.xml的mysource代码
<global><template>
<email>
<reservation_senderinfo_trans_email_id translate="label" module="reservation">
<label>Store Reservation</label>
<file>vantage/reservation/store_reservation.html</file>
<type>html</type>
</reservation_senderinfo_trans_email_id>
<reservation_senderinfo_confirm_email translate="label" module="reservation">
<label>Store Reservation sucess</label>
<file>vantage/reservation/success.html</file>
<type>html</type>
</reservation_senderinfo_confirm_email>
<reservation_senderinfo_reject_email translate="label" module="reservation">
<label>Store Reservation Reject</label>
<file>vantage/reservation/reject.html</file>
<type>html</type>
</reservation_senderinfo_reject_email>
</email>
</template><global>
这是我的system.xml文件
<?xml version="1.0"?>
<config>
<sections>
<reservation translate="label" module="reservation">
<class>separator-top</class>
<label>Reservation</label>
<tab>vantage</tab>
<frontend_type>text</frontend_type>
<sort_order>300</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<senderinfo translate="label">
<label>Sender Information</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<sender_name translate="label">
<label>Name</label>
<frontend_type>text</frontend_type>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</sender_name>
<email_add translate="label">
<label>Email Address</label>
<frontend_type>text</frontend_type>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</email_add>
<trans_email_id translate="label">
<label>Reservation Template</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_email_template</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</trans_email_id>
<confirm_email translate="label">
<label>Confirmation Template</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_email_template</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</confirm_email>
<reject_email translate="label">
<label>Reject Template</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_email_template</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</reject_email>
<trans_email_bcc translate="label">
<label>BCC</label>
<frontend_type>text</frontend_type>
<sort_order>4</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</trans_email_bcc>
<trans_email_cc translate="label">
<label>CC</label>
<frontend_type>text</frontend_type>
<sort_order>3</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</trans_email_cc>
</fields>
</senderinfo>
</groups>
</reservation>
</sections>
</config>
任何帮助将不胜感激
答案 0 :(得分:2)
无效的交易电子邮件代码。 这意味着您尚未指定要使用的模板。 您必须在config.xml中定义它:
<default>
<reservation>
<senderinfo>
<trans_email_id>reservation_senderinfo_trans_email_id</trans_email_id>
<confirm_email>reservation_senderinfo_confirm_email</confirm_email>
<reject_email>reservation_senderinfo_reject_email</reject_email>
<senderinfo>
</reservation>
</default>