Magento – Magento 1.9 problem call Helper

helper

My Config.xml

    <?xml version="1.0"?>  <config>
      <modules>
        <MyCompany_MyModule>
          <version>1.0.0</version>
        </MyCompany_MyModule>
     </modules>
     <global>
       <helpers>
          <mycompany_mymodule>
             <class>MyCompany_MyModule_Helper</class>
          </mycompany_mymodule>
       </helpers>
     </global>
   </config>

Path Helper

http\app\code\local\MyCompany\MyModule\Helper

File i want call

http\app\code\local\MyCompany\MyModule\Helper\Config.php

My Config.php Class

class MyCompany_MyModule_Helper_Config {}

My Class inside Model call Helper

http\app\code\local\MyCompany\MyModule\Model\Form\FileName.php

The Call

class MyCompany_MyModule_Model_Form_Input {
public function initializes()
{    
$helper = Mage::helper('MyCompany_MyModule/Config');
 Mage::Log($helper);
 } }

The Error

Warning: include(): Failed opening 'Mage/MyCompany/MyModule/Helper/Config.php' for inclusion 

My http\app\etc\modules\MyCompany_MyModule.xml

<?xml version="1.0"?> <config>
<modules>
    <MyCompany_MyModule>
        <active>true</active>
        <codePool>local</codePool>
    </MyCompany_MyModule>
</modules> </config>

Best Answer

Try this:

you can load your custom helper MyCompany_MyModule_Helper_Config located in

app/code/local/MyCompany/MyModule/Helper/Config.php

$helper = Mage::helper('mycompany_mymodule/config');
Related Topic