When in categroy admin, products tab don't show their status in any way. How to add that kind of feature? What files should I edit?

I think solution could be either:

  1. Add status field to listing header
  2. Add tag like "[Disabled]" to the product name in listing.

You need to extend the Category Product Grid block.
For this create a new module. Let's call it Easylife_Catalog.
You need the following files. app/etc/modules/Easylife_Catalog.xml - the declaration file

<?xml version="1.0"?>
                <Mage_Catalog />
                <Mage_Adminhtml />

app/code/local/Easylife/Catalog/etc/config.xml - the configuration file

<?xml version="1.0"?>

app/code/local/Easylife/Catalog/Block/Adminhtml/Category/Tab/Product.php - your new block

class Easylife_Catalog_Block_Adminhtml_Category_Tab_Product
    extends Mage_Adminhtml_Block_Catalog_Category_Tab_Product {
    public function _preparePage() {
        return parent::_preparePage();
    public function _prepareColumns(){
        $this->addColumnAfter('status', array(
            'header'    => Mage::helper('catalog')->__('Status'),
            'index' => 'status',
            'type'  => 'options',
            'options' => Mage::getSingleton('catalog/product_status')->getOptionArray(),
        ), 'sku');
        return parent::_prepareColumns();
    protected function _getStore()
        $storeId = (int) $this->getRequest()->getParam('store', 0);
        return Mage::app()->getStore($storeId);

Clear the cache and give it a go.


For that you have to create the Custom category attribute.

1) The atwix provide you steps how to create the Category attribute via code.

2) The Extension is also available in Magento Connect.

Hope you got your answers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.