I am trying to rewrite an observer in the extensions Xtento_GridActions. The observer is established this way:


I have created my rewrite class at app/code/local/Mymod/Orders/Model/Xtentorewrite/Observer.php and it looks like this:

class Mymod_Orders_Model_Xtentorewrite_Observer extends Xtento_GridActions_Model_Observer {

     * Get controller names where the module is supposed to modify the block
    public function getControllerNames()
        $originalArray=array('order', 'sales_order', 'adminhtml_sales_order', 'admin_sales_order', 'orderspro_order');
        return $modifiedArray;

My config.xml looks like this

 <?xml version="1.0"?>
                    <Mymod_Orders before="Mage_Adminhtml">Mymod_Orders</Mymod_Orders>

                <cron_expr>0 5 * * 1,2,3,4,5</cron_expr>
                <!-- Run on weekdays (1-5) at 5 am -->

1 Answer 1


You can override observers easily.

In your own module add this to your config xml events area


It might be worthwhile reading through this: http://www.atwix.com/magento/overriding-observers/

Also, you can see that you should not give the full class name. Give the magento alias!

  • 2
    In addition You just have to make sure that your module depends on the original module so is loaded after it.
    – Marius
    Jun 30, 2015 at 9:02
  • This doesn't answer the question. What you've provided here is how one can add their own observer to the same event, not how one can override the functionality of an existing observer. The link, however, does have details on how you overwrite an observer in various cases.
    – Mageician
    Apr 4, 2019 at 19:36
  • 1
    @BrianVPS nope. By using the same XML path, making your module depend on the Xtento_GridActions module, and making your observer extend the Xtento_GridActions_Model_Observer class it will cause your logic to trigger rather than the Xtento_GridActions module. Apr 5, 2019 at 7:04
  • 1
    @LukeRodgers I was not aware it worked that way, thanks for the clarification. I'll have to give that a shot.
    – Mageician
    Apr 16, 2019 at 14:49

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.