问题
I've installed an extension by BrandAmmo named ProNav. I went to clear the cache and it gave me this error in the admin,
Fatal error: Class **Brandammo_Pronav_Helper_Data' not found in
/home/content/r/e/d/redr1225/html/app/Mage.php on line 516**
Any idea what I need to do?
回答1:
Make sure this file exists: /home/content/r/e/d/redr1225/html/app/code/local/BrandAmmo/Pronav/Helper/Data.php
And that it creates this class:
class BrandAmmo_Pronav_Helper_Data
extends Mage_Core_Helper_Abstract
{
}
And make sure in this file: /home/content/r/e/d/redr1225/html/app/code/local/BrandAmmo/Pronav/etc/config.xml
You are declaring your helper:
<?xml version="1.0"?>
<config>
<global>
<helpers>
<pronav>
<class>BrandAmmo_Pronav_Helper</class>
</pronav>
</helpers>
</global>
</config>
Pay attention to the capitalization in BrandAmmo and make sure it's correct. Upper or lower case shouldn't matter, so long as they're all the same.
回答2:
- Make sure that the Data.php file present under your
codepool/extension_name/module_name/Helper/Data.php
- If the Data.php present in the above mentioned directory open that file and copy the class name, Basically the class name having the Magento naming sense like
packagename_modulename_foldername(Helper or Block) _ filename(Data.php)
<?php
class package_module_Helper_Data{
}
- Move to magento root folder and make sure if the package_module_Helper_Data.php present in
includes/src/
- If you art not see, create a php file with that name (which you got in error) under the src directory
- Copy contents of Data.php and paste it in newly created file that's all. I'm sure it will help you
- Still if you get error or magento showing nothing about the extension, just disable the compile mode under magento System->Tools->Compilation
回答3:
In /app/code/local/Brandammo/Pronav/Helper/Data.php you should have a php file with minimum the following code
<?php
class Brandammo_Pronav_Helper_Data extends Mage_Core_Helper_Abstract
{
}
来源:https://stackoverflow.com/questions/16595608/magento-admin-helper-data-not-found