Is there a way to add any additional columns?

The extension works great!  I was wondering if I could add one more column to mine.  We need to see the “Status” of a product to clean up our store.  Would this be possible?

1 answer

Jai Jai Staff July 25, 2016

Thank you for your interest in our extension.

Yes, we can add product’s status column to the grid by editing the below file

app/code/community/Cartin24/Categorygrid/Block/Adminhtml/Catalog/Category/Tab/Product.php

Add the following code in the _prepareCollection() function, just before $this->setCollection($collection); line

$collection->joinAttribute(‘status’, ‘catalog_product/status’, ‘entity_id’, null, ‘inner’);

And add the below code in the _prepareColumns() function, just before the return parent::_prepareColumns(); line

    $this->addColumnAfter(‘status’,
        array(
            ‘header’=> Mage::helper(‘catalog’)->__(‘Status’),
            ‘width’ => ’70px’,
            ‘index’ => ‘status’,
            ‘type’  => ‘options’,
            ‘options’ => Mage::getSingleton(‘catalog/product_status’)->getOptionArray(),
    ),’qty’);

#1

Please login or Register to Submit Answer