I want to create a copy of the order grid, the underlying collection should be modified without breaking the functionality of the original order grid.

I created a new button on the original order grid using an observer, which should lead to the new grid. This is the code for adding the new button:

public function addOnholdButton($observer) {  

    $container = $observer->getBlock();
    if(null !== $container && $container->getType() == 'adminhtml/sales_order') {
        $data = array(
            'label'     => 'On Hold',
            'class'     => '',
            'onclick'   => 'setLocation(\''  . Mage::helper('adminhtml')->getUrl('onhold/adminhtml_controller/action') . '\')',
        $container->addButton('unique-identifier', $data);

    return $this;

How would I do that?


Your Answer

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

Browse other questions tagged or ask your own question.