i want to rewrite the product grid like this
protected function _prepareCollection() {
parent::_prepareCollection();
$this->getCollection()->addAttributeToFilter('supplier', array('eq' => 11));
return $this;
}
config.xml
<blocks>
<adminhtml>
<rewrite>
<catalog_product_grid>Namespace_Modulenam_Block_Adminhtml_Catalog_Product_Grid</catalog_product_grid>
</rewrite>
</adminhtml>
</blocks>
the supplier is a custom attribute, i want the products show only according to the supplier attribute, the above code still show all the products, anyone know what's wrong with about code?