Magento Manage Category Product Grid Edit Link
One common request from my clients has been to include an 'Edit' link in the category product list, since strange enough Magento does not have one.

Fortunately this is a very simple task!
in the file 'app\code\core\Mage\Adminhtml\Block\Catalog\Category\Tab\Product.php' location the function 'protected function _prepareColumns()' and add to the end the below snippet.
$this->addColumn('action', array( 'header' => Mage::helper('catalog')->__('Action'), 'width' => '50px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('catalog')->__('Edit'), 'url' => array( 'base'=>'*/catalog_product/edit', 'params'=>array('store'=>$this->getRequest()->getParam('store')) ), 'field' => 'id' ) ), 'filter' => false, 'sortable' => false, 'index' => 'stores', ));
The end result should be should look something like this...
protected function _prepareColumns() { if (!$this->getCategory()->getProductsReadonly()) { $this->addColumn('in_category', array( 'header_css_class' => 'a-center', 'type' => 'checkbox', 'name' => 'in_category', 'values' => $this->_getSelectedProducts(), 'align' => 'center', 'index' => 'entity_id' )); } $this->addColumn('entity_id', array( 'header' => Mage::helper('catalog')->__('ID'), 'sortable' => true, 'width' => '60', 'index' => 'entity_id' )); $this->addColumn('name', array( 'header' => Mage::helper('catalog')->__('Name'), 'index' => 'name' )); $this->addColumn('sku', array( 'header' => Mage::helper('catalog')->__('SKU'), 'width' => '80', 'index' => 'sku' )); $this->addColumn('price', array( 'header' => Mage::helper('catalog')->__('Price'), 'type' => 'currency', 'width' => '1', 'currency_code' => (string) Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE), 'index' => 'price' )); $this->addColumn('position', array( 'header' => Mage::helper('catalog')->__('Position'), 'width' => '1', 'type' => 'number', 'index' => 'position', 'editable' => !$this->getCategory()->getProductsReadonly() //'renderer' => 'adminhtml/widget_grid_column_renderer_input' )); $this->addColumn('action', array( 'header' => Mage::helper('catalog')->__('Action'), 'width' => '50px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('catalog')->__('Edit'), 'url' => array( 'base'=>'*/catalog_product/edit', 'params'=>array('store'=>$this->getRequest()->getParam('store')) ), 'field' => 'id' ) ), 'filter' => false, 'sortable' => false, 'index' => 'stores', )); return parent::_prepareColumns(); }
- Prema Blog:



