0

I tried to create an email template in my custome module.In admin panel i got below error

Fatal error: Class 'Mage_Ayakil_Muja_Helper_Data' not found in C:\xampp\htdocs\mage19\app\Mage.php on line 547

How I tried is below.

<config>
<modules>
    <ayakil_muja>
        <version>0.1.0</version>
    </ayakil_muja>
</modules>
<global>
    <template>
        <email>
            <ayakilmuja_email_template1 module="muja">
                <label>ActiveCodeline custom email module</label>
                <file>ayakil_muja_custom_email1.html</file>
                <type>html</type>
            </ayakilmuja_email_template1>
        </email>
    </template>
</global>
</config>

Created the template file ayakil_muja_custom_email1.html in app\locale\en_US\template\email

My data.php file in the module Helper folder is like below

<?php
class Ayakil_Muja_Helper_Data extends Mage_Core_Helper_Abstract
{

}

If I remove module="muja" part in config.xml the error is not coming. What is this module here in <template> section?

Since I am creating a new module, Why I am getting errors from Mage? Can any one help me to fix this error and create the email template or suggest me a good practice way to create the email template for custom module.

  • Can you please post full code of config.xml? – Prashant Valanda Oct 17 '16 at 5:17
1

Please add helpers in your global node like below, just add below helper node in your global node if you have write module="ayakil_muja" then it will search for helper class but in your config.xml definition, it will not find any ayakil_muja helper that is why you got this error.

<global>
   <helpers>
    <muja>
        <class>Ayakil_Muja_Helper</class>
    </muja>
   </helpers>
   <template>
    <email>
        <ayakilmuja_email_template1 module="ayakil_muja">
            <label>ActiveCodeline custom email module</label>
            <file>ayakil_muja_custom_email1.html</file>
            <type>html</type>
        </ayakilmuja_email_template1>
    </email>
   </template>

</global>
  • thank you, i checked based on your answer.i want to add only <muja> instead of <ayakil_muja> – Mujahidh Oct 17 '16 at 15:31
0

You have to write you module name like this

<Ayakil_Muja>
        <version>0.1.0</version>
</Ayakil_Muja>
  • thank you for the answer, this is not working – Mujahidh Oct 17 '16 at 2:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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