2
我正在尝试创建新的产品类型。但是我总是得到一个错误,找不到帮助者方法。为什么Magento在Mage Namespace搜索Method而不是在Xcrypt?未能加载Magento帮助程序类
缓存是禁用,我冲了Magento的缓存和缓存存储...
ERR (3): Warning: include(): Failed opening 'Mage/Android/Helper/Data.php' for inclusion
(include_path='/var/www/URL/app/code/local:
/var/www/URL/app/code/community:
/var/www/URL/app/code/core:
/var/www/URL/lib:
.:
/usr/share/php:/usr/share/pear') in
/var/www/URL/lib/Varien/Autoload.php on line 93
文件和目录结构
app/code/local/Xcrypt/Android$ ls -R
./etc:
config.xml
./Helper:
Data.php
./Model/Product/Type:
App.php
3210
<?xml version="1.0"?>
<config>
<modules>
<Xcrypt_Android>
<version>0.1.0</version>
</Xcrypt_Android>
</modules>
<adminhtml>
<translate>
<modules>
<Xcrypt_Android>
<files>
<default>Xcrypt_Android.csv</default>
</files>
</Xcrypt_Android>
</modules>
</translate>
</adminhtml>
<global>
<models>
<android>
<class>Xcrypt_Android_Model</class>
</android>
</models>
<catalog>
<product>
<type>
<android translate="label" module="Android">
<label>Android Product Type</label>
<model>android/product_type_app</model>
</android>
</type>
</product>
</catalog>
<helpers>
<android>
<class>Xcrypt_Android_Helper</class>
</android>
</helpers>
</global>
</config>
助手/ Data.php
<?php
class Xcrypt_Android_Helper_Data extends Mage_Core_Helper_Abstract {
}
?>
型号/产品/型号/ App.php
<?php
class Xcrypt_Android_Model_Product_Type_App extends Mage_Catalog_Model_Product_Type_Abstract {
}
?>
应用程序的/ etc /模块/ Xcrypt_Android.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Xcrypt_Android>
<active>true</active>
<codePool>local</codePool>
</Xcrypt_Android>
</modules>
</config>
不完全正确:“模块”参数需要解析到配置的辅助类组,否则配置对象将假定文件在Mage命名空间下定义(因此包含错误)。你有你的模块的辅助类组配置为“android”,所以这就是为什么在你的情况下,它将需要小写。 – benmarks