0

嗨,我正在尝试为我的自定义模块制作交易电子邮件。我的模块需要三个默认电子邮件。一个通知预订请求被发送以进行审核,另外两个用于成功和失败。当我尝试发送预订请求的电子邮件时,它已完全成功发送,但是当我尝试成功或失败时,它向我显示以下错误:无效的交易电子邮件代码:数组

这是我的 config.xml 的源代码

<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>

任何帮助将不胜感激

4

1 回答 1

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>
于 2012-08-01T09:04:30.197 回答