1

. I try :

    <template>
        <email>
            <simpleaffiliate_general_emailtemplate translate="label" module="simpleaffiliate">
                <label>Test Send Email</label>
                <file>test_sendemail.html</file>
                <type>html</type>   
            </simpleaffiliate_general_emailtemplate>

            <simpleaffiliate_general_emailtemplate translate="label" module="simpleaffiliate">
                <label>Test Send Email2</label>
                <file>test_sendemail2.html</file>
                <type>html</type>   
            </simpleaffiliate_general_emailtemplate>
        </email>
    </template>

and in system.xml

                    <emailtemplate translate="label">
                        <label>Email Template sent to new registered </label>
                        <frontend_type>select</frontend_type>
                        <sort_order>6</sort_order>
                        <source_model>adminhtml/system_config_source_email_template</source_model>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <comment></comment>
                    </emailtemplate>

but I get only a option : Test Sent Email 2 (Default from Locale) , I want add other options . Can you help me :D

1 Answer 1

1

The problem is that the node simpleaffiliate_general_emailtemplate needs to be unique so it only knows about the last entry in the xml.

To make this work for more than one email you would need to make a change to the Mage_Adminhtml_Model_System_Config_Source_Email_Template::toOptionArray so when it loads from the xml it can work with more than one entry.

Or create your own source model for this case that will load all the email templates from the database and then adds in your new ones from the xml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.