S
S
Sergei Gurdjiyan2016-12-13 14:15:42
Magento
Sergei Gurdjiyan, 2016-12-13 14:15:42

How to change button in Magento admin panel after sending order email?

Task:
There is a Send Email button in order.
You need to change the text and style. Made

if ($this->_isAllowedAction('emails') && !$order->isCanceled()) {
            $message = Mage::helper('sales')->__('Can you confirm that you would like to send a Follow-Up email?');
            $this->addButton('send_notification', array(
                'label'     => Mage::helper('sales')->__('Send Follow-up Email'),
                'onclick'   => "confirmSetLocation('{$message}', '{$this->getEmailUrl()}')",
                'class'     => "yellow",
            ));
        }

When sending the first letter, you need to replace the text and class with new ones, after the second letter is sent, change the text and make the button inactive.
How can this problem be solved?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question