I am trying to override the following block but it isn't working for me
magento/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php
Here's my config file under app/etc/modules
<?xml version="1.0"?>
<config>
<modules>
<MF_Adminhtml>
<active>true</active>
<codePool>local</codePool>
</MF_Adminhtml>
</modules>
</config>
And my module's config file
<?xml version="1.0"?>
<config>
<modules>
<MF_Adminhtml>
<version>0.0.1</version>
</MF_Adminhtml>
</modules>
<global>
<blocks>
<adminhtml>
<rewrite>
<catalog_product_edit_tab_alerts_stock>MF_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts_Stock</catalog_product_edit_tab_alerts_stock>
</rewrite>
</adminhtml>
</blocks>
</global>
</config>
And the local php class is located under magento/app/code/local/MF/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php
and looks like this
class MF_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts_Stock extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts_Stock
{
protected function _prepareCollection()
{
$productId = $this->getRequest()->getParam('id');
$websiteId = 0;
if ($store = $this->getRequest()->getParam('store')) {
$websiteId = Mage::app()->getStore($store)->getWebsiteId();
}
if (Mage::helper('catalog')->isModuleEnabled('MF_ProductAlert')) {
$collection = Mage::getModel('mf_productalert/stock')
->getCustomerCollection()
->join($productId, $websiteId);
$this->setCollection($collection);
}
return parent::_prepareCollection();
}
}
Magento is still using the core block instead of the local one. Anyone got any ideas?