請求書ページの ActionList に新しいアクションを追加する必要があります
。magento がこのリストを作成する場所と、選択したアクションを呼び出す方法がわかりません。
ありがとう!
ジョナサン
オーバーライドしたいクラスは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;
}
それが役立つことを願っています!
ありがとう、ジョー