Класс, который вы хотите переопределить, - Mage_Adminhtml_Block_Sales_Invoice_Grid
. Скопируйте этот файл в локальное пространство (так что у вас будет app/code/local/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
), а затем измените следующую функцию:
protected function _prepareMassaction()
{
$this->setMassactionIdField('entity_id');
$this->getMassactionBlock()->setFormFieldName('invoice_ids');
$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
'label'=> Mage::helper('sales')->__('PDF Invoices'),
'url' => $this->getUrl('*/*/pdfinvoices'),
));
// your action goes here
$this->getMassactionBlock()->addItem('handle', array(
'label'=> Mage::helper('sales')->__('Your Action Label'),
'url' => $this->getUrl('path/to/your/action'),
));
return $this;
}
Надеюсь, это поможет!
Спасибо,
Джо