2013-06-27 33 views

回答

0

如果你需要添加像保持一個按鈕,你需要通過使用模塊寫入文件的應用程序/代碼/核心/法師/ Adminhtml /座/銷售/訂單/ View.php訂購頁面

<rewrite> 
       <sales_order_view>Namespace_Module_Block_Adminhtml_Sales_Order_View</sales_order_view> 
      </rewrite> 

public function __construct() { 

     parent::__construct(); 

     $this->_addButton('your_button_id', array(
      'label'  => Mage::helper('xxx')->__('Some action'), 
      'onclick' => "setLocation('".$this->getUrl('*/*/Youbuttonfunction')."')",/* refere ref1*/ 
      'class'  => 'go' 
     ), 0, 100, 'header', 'header'); 
    } 

ref1: you need to add Youbuttonfunction function in module controller perform your action and return back to order url 

您可以從下面獲得參考鏈接add-button-in-any-admin-page

+0

我怎樣才能得到這個按鈕來設置訂單狀態到我所做的狀態? – user2526941

+0

您必須將訂單狀態的值傳遞給函數,然後才能執行所需的操作。如果您添加$ this - > _ addButton('your_button_id',array(在構造函數中,您將在視圖頁上獲得按鈕,但要工作則需要編寫函數 –

相關問題