I am stuck on overriding model class only in EE version.

My config.xml





and my DigitalCinema/Pos/Model/Sales/Taken.php

class DigitalCinema_Pos_Model_Sales_Taken extends Mage_Sales_Model_Order
     public function sendNewOrderEmail()



See following line: <order>DigitalCinema_Pos_Model_Sales_Taken</order>

Only this one (sales_model_order.php) is not getting overridden. All others are working.

I can also confirm that it is working in community version.

Any help is much appreciated.


As Marius suggested, I have checked module conflict and can see there is another module rewriting same class. However, that module is not overwriting the class I am trying overwrite. Now, I have found this link. And would like to use Option 2. But it is not working. Now my Taken.php becomes as follows:

class DigitalCinema_Pos_Model_Sales_Taken extends Other_Module_Model_Order

Anything I am missing on this?

  • Check if you have an other module rewriteing the order model. Here is a small script that let's you do this: magento.stackexchange.com/a/1600/146
    – Marius
    May 18, 2015 at 6:47
  • @Marius That's good to know, but I have tested by editing core file order.php and it does executes. That means that particular function is not overwritten. May 18, 2015 at 6:55
  • Just to make sure...did you clear the cache and disabled the compilation?
    – Marius
    May 18, 2015 at 6:58
  • Yes, I have cleared cache and compilation is disabled at the moment. Thanks May 18, 2015 at 7:00
  • Is your module loaded? Generate an parsing error in the config.xml by renaming the closing </config> to </blabla>. Site should blow up after cleaning config cache, with developer mode turned on. If not, check your modules file. Inject some logging into Mage_Core_Module_Config, loadModuleCache and related, if you don't see anything wrong with it.
    – user4351
    May 18, 2015 at 7:18

1 Answer 1


Based on the comments...the order model is overwritten by an other class.
You need to make your class extend the other class like you did

class DigitalCinema_Pos_Model_Sales_Taken extends Other_Module_Model_Order

and you make your module depend on the other module so yours is loaded after it.
For this, make your app/etc/modules/DigitalCinema_Pos.xml file look like this:

<?xml version="1.0"?>
                <Other_Module />
                <Mage_Sales />

clear the cache and it should work.

  • Thanks, I am wondering what will happen if Other_Module is disabled? Will site throw error? Is there a way to make it work automatically even if other_module is disabled or removed? May 19, 2015 at 23:54

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.