我在Mage_Adminhtml_Block_Customer_Edit重写__construct()方法时遇到一些问题
我的config.xml如下: -
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Mymodule_Customisation>
<version>0.0.1</version>
</Mymodule_Customisation>
</modules>
<global>
<blocks>
<customisation>
<class>Mymodule_Customisation_Block</class>
</customisation>
<adminhtml>
<rewrite> <Customer_Edit>Mymodule_Customisation_Block_Adminhtml_Customer_Edit</Customer_Edit>
</rewrite>
</adminhtml>
</blocks>
</global>
</config>
我在app / code / local / Mymodule / Customization / Block / Adminhtml / Customer / Edit.php下有Edit.php方法
我的班级看起来像这样
class Mymodule_Customisation_Block_Adminhtml_Customer_Edit extends Mage_Adminhtml_Block_Customer_Edit
{
public function __construct()
{}
}
我做错了什么?
答案 0 :(得分:0)
Nabeel.Issue在config.xml文件中重写代码
<Customer_Edit>
应为<customer_edit>
<rewrite>
<customer_edit>Mymodule_Customisation_Block_Adminhtml_Customer_Edit</customer_edit>
</rewrite>