You've done what you need to up to wiring in your controller.
First you need to declare a route for your controller(s) in the module config XML:
...
<admin>
...
<routers>
<masscustomstatusses>
<use>admin</use>
<args>
<module>VivasIndustries_MassCustomStatusses</module>
<frontName>masscustomstatusses</frontName>
</args>
</masscustomstatusses>
</routers>
...
</admin>
...
Then build the controller:
<?php
class VivasIndustries_MassCustomStatusses_ControllerController
extends Mage_Adminhtml_Controller_Action
{
public function actionAction()
{
// Update status here
// Can fetch selected items with $this->getRequest()->getParam()
die('Looks like it works');
}
}
I've used your naming convention exactly as you have described, though I doubt that's what you really want. Better to use standard Magento convention, with controller named IndexController
and base action named indexAction
. But you should get the idea.
Clear cache and try to run that mass action. The die
statement should run, and fill in the blanks from there.
NOTE: I should point out that you're doing the same thing twice. You are both extending the sales order grid to add a mass action AND injecting it via event observer. As the article you reference points out, those are 2 different ways to do the same thing. You should choose one of those methods, only.
Best Answer
You need to define router for adminhtml in order to get it work with your custom module. You can define the same at app\code{{your_package}}{{your_module}}\etc\adminhtml\routes.xml as like below:
You can define your own frontName for admin route. Now in your ui xml file, available at view\adminhtml\ui_component under custom mass action search the item name="url" and set path like "orderdelete/order/massDelete"
It should work if you will implement it correctly.
Please refer below module which I developed to add new MassDelete action in sales order grid (All the below files should be in your custom module i.e. package_module).