1
我试图覆盖magento企业catalogevent块,但其相同的faltal错误导致:致命错误:调用成员函数setData()在.. \ www \ app \ code中的非对象\核心\法师\ Adminhtml \块\小工具\表格\ Container.php上线129 我的新模块的config.xml:magento管理员表单替换
<global>
<blocks>
<ss_todaysevents>
<class>Ssd_Todaysevents_Block</class>
</ss_todaysevents>
<enterprise_catalogevent>
<rewrite>
<adminhtml_event_edit_form>
Ss_TodaysEvents_Block_Adminhtml_Event_Edit_Form
</adminhtml_event_edit_form>
</rewrite>
</enterprise_catalogevent>
</blocks>
</global>
Ss_TodaysEvents_Block_Adminhtml_Event_Edit_Form类是在.. \ WWW \程序\代码\本地\ SS \ TodaysEvents \ Block \ Adminhtml \ Event \ Edit \ Form.php并且有以下代码:
class Ss_TodaysEvents_Block_Adminhtml_Event_Edit_Form extends Enterprise_CatalogEvent_Block_Adminhtml_Event_Edit_Form
{
protected function _prepareForm()
{
parent::_prepareForm();
if (Mage::getConfig()->getModuleConfig('Ss_Brands')->is('active')) {
$fieldset = $this->getForm()->getElements()->searchById('general_fieldset');
$fieldset->addField('brand_name', 'select',
array(
'label' => Mage::helper('brands')->__('Brand'),
'title' => Mage::helper('brands')->__('Brand'),
'name' => 'brands_id',
'values' => Mage::helper('brands')->getBrandsArrayList(),
)
);
}
return $this;
}
}
那里有什么?谢谢
您可以添加错误消息提及的相关代码块吗? – 2011-12-26 15:11:52
' Ssd_Todaysevents_Block '只是出于好奇,为什么额外的'd'?而不只是'Ss_' ...? –
B00MER
2011-12-27 00:49:22