PHP Magento Tips

Add Product Edit Link In Category Product Tab in Magento Admin

Rate this posting:

In Previous Post you can find we have added Product Edit Link In Category Product Tab in Magento Admin With Custom Renderer

Actually you can do this without custom renderer as per below:

Step 1: Create Module Initialization file. Create app/etc/modules/Mycompany_CategoryProductlink.xml file and add below code:

<?xml version="1.0"?>









Step 2: Create Main config.xml file. Create app/code/local/Mycompany/CategoryProductlink/etc/config.xml file and add below code in it:

<?xml version="1.0"?>

Here we rewrite <catalog_category_tab_product> node. So create your rewrite file for that.

Step 3: Create app/code/local/Mycompany/CategoryProductlink/Block/Adminhtml/Catalog/Category/Tab/Product.php file and add below code in it.

require_once 'Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php';
class Mycompany_CategoryProductlink_Block_Adminhtml_Catalog_Category_Tab_Product extends Mage_Adminhtml_Block_Catalog_Category_Tab_Product {

 /*Overwrite prepare column to provide edit functionality in category */
    protected function _prepareColumns()
                'header'    => Mage::helper('catalog')->__('Action'),
                'type'      => 'action',
                'getter'     => 'getId',
                'actions'   => array(
                        'caption' => Mage::helper('catalog')->__('Edit'),
                        'url'     => array(
                        'field'   => 'id',
                     'popup'   => true
                'filter'    => false,
                'sortable'  => false,
                'index'     => 'stores',

Here we include core file and call other column with parent::_prepareColumns(); (see highlighted lines). And last we add our new column for product edit link.

By setting "popup'   => true" parameter edit product link will open in popup window instead of new blank window.

Download Whole Module from Github:
0 Comments On "Add Product Edit Link In Category Product Tab in Magento Admin"

Back To Top