0

Sales order gridHow to add the new mass action in magento sales order grid to update my custom status.

0

your config.xml for event calling

<events>
            <core_block_abstract_prepare_layout_before>
                <observers>
                    <modulename>
                        <class>modulename/observer</class>
                        <method>addActions</method>
                    </modulename>
                </observers>
            </core_block_abstract_prepare_layout_before>
        </events>

your observer function

class Spacename_Moudlename_Model_Observer
{
    public function addActions($observer)
        {



         $block = $observer->getEvent()->getBlock();
                if(get_class($block) =='Mage_Adminhtml_Block_Widget_Grid_Massaction'
                    && $block->getRequest()->getControllerName() == 'sales_order')
                {


                    $block->addItem('--Your Label--', array(
                        'label' => '--Your Label--' ,
                        'url' => '',
                        'target'    => '_blank'
                    ));

              }

    }}
  • In which config.xml and observer function can i add the given code. @Qaisar Satti – chandra sekar Nov 5 '15 at 12:52
  • your module config.xml or you want to add directly?? – Qaisar Satti Nov 5 '15 at 12:54
  • Where i mention the action? – chandra sekar Nov 5 '15 at 12:58
  • if you asking about the massaction url you can add it 'url' => 'your post action url', – Qaisar Satti Nov 5 '15 at 13:00
  • I'm not sure that's the right event to observe – Robbie Averill Nov 5 '15 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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