I must place a button in order view that will send further the order id. The id will be used for a simple database query then it should return to order view.
I found out how to create the button, I created app/code/local/Mage/Adminhtml/Block/Sales/Order/View.php
following the view.php from core.
Here is my code :
class Mage_Adminhtml_Block_Sales_Order_View extends
Mage_Adminhtml_Block_Widget_Form_Container
{
public function __construct()
{
$this->_objectId = 'order_id';
$this->_controller = 'sales_order';
$this->_mode = 'view';
parent::__construct();
$this->_removeButton('delete');
$this->_removeButton('reset');
$this->_removeButton('save');
$this->setId('sales_order_view');
$order = $this->getOrder();
$this->_addButton('release_payment', array(
'label' => Mage::helper('sales')->__('Release Payment'),
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/release') . '\')',
'class' => 'go'
));
}
What I want is that this location that should be sales_order/release to actually do something with the order id. I tried to understand how but I can't manage to actually create the controller.