Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Issues with Helper-Classes
 
backzwang
Jr. Member
 
Total Posts:  4
Joined:  2008-05-28
 

Hello,

I am currently developing an custom module and I want to add some helper-classes.

I create a file under local/Mypackage/mymodule/helper/Email.php which looks like this:

<?php
class Mypackage_Mymodule_Helper_Email extends Mage_Core_Helper_Abstract {
    
public function setupEmail($eMailData{
        
...
    
}
}
?>

If I write in my Block-class, which generates the layout properly, the line “$this->helper(’mymodule/email’)” I get an error like:

Fatal error: Class 'Mage_Mymodule_Helper_Email' not found in /var/www/papillon/html/app/code/core/Mage/Core/Model/App.php on line 718

So basicly the method searches for the helper-class in the Mage-package somehow. Is there something I have to confiure in my config.xml to run own helpers? Other parts like blocks and modules are working fine.

Thanks in advance
Christian

 
Magento Community Magento Community
Magento Community
Magento Community
 
backzwang
Jr. Member
 
Total Posts:  4
Joined:  2008-05-28
 

After reading this answer: http://www.magentocommerce.com/boards/viewthread/1497/#t6976 I have tried this following entry in my config.xml at my module.

<global>
 ...
 <
helpers>
   <
mymodule>
    <class>
Mypackage_Mymodule_Helper</class>
   </
mymodule
 </
helpers>
 ...
</global>

And it works! Never thought that it would be so trival.. wink

Sorry for bothering

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top