i try to override magento enterprise catalogevent block, but its same faltal error leading:Fatal error: Call to a member function setData() on a non-object in ..\www\app\code\core\Mage\Adminhtml\Block\Widget\Form\Container.php on line 129 my new module config.xml:
<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 class is in ..\www\app\code\local\Ss\TodaysEvents\Block\Adminhtml\Event\Edit\Form.php and has following code:
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;
}
}
What worng there? Thanks
<class>Ssd_Todaysevents_Block</class>
Just out of curiosity, why the extrad
? and not justSs_
... ? – B00MER