Magento – How to add button and Action in User Order Information

customermagento-1.9

Can somebody please help me and give me information how to add custom button in Magento (1.9) customer order review ? I want to add button with send e-mail Action , i want to add e-mail content in backend so i don't need any input. I want only add action to button

I added button in app/desing/frontend/base/default/template/sales/order/view.phptml

this is code:

<p><a class="btn btn-warning" href="#">Send e-mail Action</a></p>
<div class="buttons-set">
    <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->getBackTitle() ?></a></p>
</div>

Now my questions

Can somebody please tell me how and where add Action function to this button ?.
I will handle myself with all code but i want to now where to put all code.

Best Answer

Best approach would be, you will need to develop an extension for this because you will need to call action function.

For creating simple extension to be able to call your action, check this link.

Basically, you will be calling the function (for ex. public function yourAction()) which is in your own controller file.

Related Topic