1

I am using Mage::helper('addmultiple') where addmultiple is my module name Mycompany_Addmultiple_Helper_Data in Data.php in my modules helper. it gives a fatal error and why it tries to locate Mage_Addmultiple_Helper_Data instead of Mycompany_Addmultiple_Helper_Data

xml entry in my global block

<helpers>
    <addmultiple>
        <class>Mycompany_Addmultiple_Helper</class>
    </addmultiple>
</helpers>

note that when i call this from my block file or controller file from same module it is working.

I am trying to call this from some overridden core template right now.

Hitendra
  • 47
  • 8
Dmaze
  • 37
  • 2
  • 10

1 Answers1

1

Try with this.

config.xml

<helpers>
    <addmultiple>
        <class>Mycompany_Addmultiple_Helper</class>
    </addmultiple>
</helpers>

Use a name for your helper class instead of default name 'Data.php'. Here I'm using Test.php as the helper class.

class Mycompany_Addmultiple_Helper_Test extends Mage_Core_Helper_Abstract
{
   // some code
   } 

Now you can call the Test.php helper class as below.

$my_helper = Mage::helper('addmultiple/test');
Sukeshini
  • 1,241
  • 2
  • 23
  • 48
  • it is looking for Mage_Addmultiple_Helper_Test by code suggested by you. i dont understand why it replaces the company name with mage – Dmaze Aug 29 '13 at 09:24
  • seems to have resolved. The encapsulating node in the config section should be the module name as you suggested. for complete post I read here. http://stackoverflow.com/questions/9190044/magento-module-fatal-error-class-mage-cashondelivery-helper-data-not-found-in – Dmaze Aug 29 '13 at 09:37