I am using Magento 1.9.1 .

I am working on a new extension which is adding new custom mass status action here:

enter image description here

Here is my code:

/app/code/local/VivasIndustries/MassCustomStatusses/etc/config.xml :

<?xml version="1.0"?>


class VivasIndustries_MassCustomStatusses_Block_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
    protected function _prepareMassaction()

        // Append new mass action option 
            array('label' => $this->__('New Mass 1'), 
                  'url'   => $this->getUrl('masscustomstatusses/controller/action') //this should be the url where there will be mass operation


class VivasIndustries_MassCustomStatusses_Model_Observer
    public function newMassAction1($observer)
        $block = $observer->getEvent()->getBlock();
        if(get_class($block) =='Mage_Adminhtml_Block_Widget_Grid_Massaction'
            && $block->getRequest()->getControllerName() == 'sales_order')
            $block->addItem('masscustomstatusses', array(
                'label' => 'New Mass 1',
                'url' => Mage::app()->getStore()->getUrl('masscustomstatusses/controller/action'),

So here is what i've done by this guide: http://www.blog.magepsycho.com/adding-new-mass-action-to-admin-grid-in-magento/

The actions is appearing but when i select it and try to update the order statuss i get error for not exising link like this: http://mymagento.com/index.php/masscustomstatusses/controller/action/key/59418867a73fa5784acb31a23b2a1510/

I know i must add some more things but i have no idea what i should add.

Can you help me out so i can make this thing update the status ?

Thanks in advance!

1 Answer 1


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:


Then build the controller:


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.

  • It seems i'm making something wrong, here is my config.xml after your answer: pastebin.com/caz87NMq and here is my /app/code/loca/VivasIndustries/MassCustomStatusses/controllers/IndexController.php: pastebin.com/89Q9dfQT And again when i try to update i got error 404 on mymagento.com/index.php/masscustomstatusses/controller/action/… Commented Nov 28, 2014 at 22:44
  • The admin/routers setup should not be in the global node. Move it up a level, as a child of the root config node. Commented Nov 29, 2014 at 1:34
  • Now i got 404 but in the admin panel.. Commented Nov 29, 2014 at 14:36
  • Please check the path to your controller, should be something like app/code/local/VivasIndustries/MassCustomStatusses/controllers/ControllerController.php -- note the lowercase c in the controllers directory. Commented Dec 2, 2014 at 14:17
  • Now i got 404 page redirect.any solution?
    – meet
    Commented Dec 11, 2017 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.