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– Prashant Valanda2016年10月17日 05:17:57 +00:00Commented Oct 17, 2016 at 5:17
2 Answers 2
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– Mujahidh2016年10月17日 15:31:14 +00:00Commented Oct 17, 2016 at 15:31
You have to write you module name like this
<Ayakil_Muja>
<version>0.1.0</version>
</Ayakil_Muja>