1

I need to add 1 input box and custom button in sale view section under admin.which send emails to those email ids which is in input box. How can I do this?

1
  • 1
    try this code:-_addButton $this->_addButton('button_id', array( 'label' => Mage::helper('adminhtml')->__('Some action'), 'onclick' => 'jsfunction(this.id)', 'class' => 'go' ), 0, 100, 'header'); Commented Jul 3, 2015 at 12:04

2 Answers 2

1

You can do this add below:

$this->_addButton('buttom_name', array(
                'label'     => Mage::helper('sales')->__('ButtonLabel'),
                'onclick'   => 'setLocation(\'' . $SUbmitUrl . '\')',
            ));

to class Mage_Adminhtml_Block_Sales_Order_View

then You need an new action to Mage_Adminhtml_Sales_OrderController class where th form will be submited.

1

Take a look at https://stackoverflow.com/questions/14616499/magento-custom-order-attribute-admin-input-and-display

Since you are trying to add a text field and a submit button, I would suggest doing something like this

enter image description here

The above form information will be posted to a custom controller. You will need to modify this code slightly Mage_Sales_Model_Order::sendNewOrderEmail() in app/code/core/Mage/Sales/Model/Order.php in-order to resend the order email to new recipient

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.