Deep Zalavadiya
Deep Zalavadiya

Reputation: 581

How to find which type of error in app/Mage.php line no. 546 in magento 1.9?

I am getting Magento : Fatal error: Class 'Mage_Fooman_Helper_Data' not found in …/app/Mage.php on line 546. which code i have to put in this function to get error of which type? please check this code:

<?php
public static function helper($name)
{
    $registryKey = '_helper/' . $name;
    if (!self::registry($registryKey)) {
       $helperClass = self::getConfig()->getHelperClassName($name);
       self::register($registryKey, new $helperClass);
    }
    return self::registry($registryKey);
}
?>

Upvotes: 0

Views: 386

Answers (1)

Matt O
Matt O

Reputation: 1346

The error message you're seeing is the best info you're going to get, but it's something that isn't easy to figure out for first-timers. You're seeing that because Magento can't find a class you're trying to access via the following:

Mage::helper("fooman")

When it tries to fall back to Mage_*, it means you haven't provided corresponding config.xml to define where the fooman helper is located. Your Fooman module should include the following in it's etc/config.xml (replacing Namespace_Fooman with your own names):

<helpers>
  <fooman>
      <class>Namespace_Fooman_Helper</class>
  </fooman>
</helpers>

Upvotes: 1

Related Questions