How can I call admin controller of custom module using the following code. I have tried to search on google but was unable to find anything
Here is the code of Mynamespace/TypeChanger/Block/Adminhtml/Catalog/Product/Grid.php
class Mynamespace_TypeChanger_Block_Adminhtml_Catalog_Product_Grid extends Mage_Adminhtml_Block_Catalog_Product_Grid
{
protected function _prepareMassaction()
{
parent::_prepareMassaction();
// Append new mass action option
$this->getMassactionBlock()->addItem(
'typechanger',
array('label' => $this->__('Change Type'),
'url' => $this->getUrl('abc'),
//this should be the url where there will be mass operation
'additional' => array(
'visibility' => array(
'name' => 'type',
'type' => 'select',
'class' => 'required-entry',
'label' => Mage::helper('catalog')->__('Type'),
'values' => array('simple' => 'simple','grouped' => 'grouped' , 'configurable' => 'configurable' ,'virtual'=> 'virtual', 'bundle'=> 'bundle', 'downloadable'=>'downloadable')
)
)
)
);
}
}
here is the code for config.xml
<?xml version="1.0"?>
<config>
<modules>
<Mynamespace_TypeChanger>
<version>1.0</version>
</Mynamespace_TypeChanger>
</modules>
<admin>
<routers>
<typechanger>
<use>admin</use>
<args>
<module>Mynamespace_TypeChanger</module>
<frontName>abc</frontName>
</args>
</typechanger>
</routers>
</admin>
<global>
<blocks>
<adminhtml>
<rewrite>
<catalog_product_grid>Mynamespace_TypeChanger_Block_Adminhtml_Catalog_Product_Grid</catalog_product_grid>
</rewrite>
</adminhtml>
</blocks>
<helpers>
<typechanger>
<class>Mynamespace_TypeChanger_Helper</class>
</typechanger>
</helpers>
</global>
</config>