【发布时间】:2016-02-18 21:57:01
【问题描述】:
基本上,我为 Magento 制作了一个插件,当我安装它时,我总是从 Mage.php 收到一个致命错误,说我的课程未找到 - 这是我的 XML:
<?xml version="1.0"?>
<config>
<modules>
<Johnhudson_MyPlugin>
<version>1.0.0</version>
</Johnhudson_MyPlugin>
</modules>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<Johnhudson_MyPlugin after="Mage_Adminhtml">Johnhudson_MyPlugin</Johnhudson_MyPlugin>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<global>
<helpers>
<johnhudson_myplugin>
<class>Johnhudson_MyPlugin_Helper</class>
</johnhudson_myplugin>
</helpers>
</global>
</config>
还有我的 Helper 类:
<?php
class Johnhudson_MyPlugin_Helper_Data extends Mage_Core_Helper_Abstract
{
}
当我尝试安装它并清除缓存时,它总是给我一个致命错误,并以某种方式将我的“Johnhudson”包名称更改为“Mage”,显示为“Mage_MyPlugin_Helper_Data”,我的帮助文件被保存为数据。 php 根据需要。
【问题讨论】: