I created a custom module to add a button to the order view page.
The button shows up and now it is time to create the action attached. When clicking the button I want 2 things to happen:
Set the order status to: Ready for Pickup (pickup_ready) which I defined in order statusses
Send a transactional email to the client to inform them it is ready
My button looks like this for now:
{
public function __construct() {
parent::__construct();
$this->_addButton('inform_pickup', array(
'label' => Mage::helper('sales')->__('Custom Pickup Button'),
'onclick' => 'setLocation(\'' . $this->getPickupUrl() . '\')',
));
}
public function getPickupUrl()
{
Not a clue what to put here......;
}
}
Any help is appreciated
Best Answer
In construct function you will need to pass order object in your
You will need to create your controller to handle the action
In your controller class create your action for example