I can't seem to figure out how to get my observer fire.

Everywhere I look the examples on how to implement one differ ever so slightly in where capitals go and simple things like that. So here's my code, please point out what I'm doing wrong!


<?xml version="1.0"?>


<?xml version="1.0"?>



class Mynamespace_Mymodule_Model_Observer extends Varien_Event_Observer
    public function __construct() {

    public function on_order_changed($observer) {
        try {
            $mail = Mage::getModel('core/email');
            $mail->setToName('Your Name');
            $mail->setToEmail('[email protected]');
            $mail->setBody('Mail Text / Mail Content');
            $mail->setSubject('Mail Subject');
            $mail->setFromEmail('[email protected]');
            $mail->setFromName("Msg to Show on Subject");
        } catch (Exception $e) {


2 Answers 2


Try using


instead of


See this for some more reference.

  • This solved the problem. Thanks a million times!
    – hibyprime
    Oct 17, 2014 at 16:12

Try removing extends Varien_Event_Observer from your Observer.php. It is the class of the $observer being passed into your on_order_changed method but is not commonly used as the parent class for the observing class itself.

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.