I want to override the core class Mage_Sales_Model_Quote_Address_Total_Subtotal

So following different tutorials I did this :

Lebernard is my namespace, Vente, my module

<?xml version="1.0" encoding="UTF-8" ?>


Then I created the model which is suppose to override it by copying the core class. I want to change the fetch method.

class Lebernard_Vente_Model_Quote_Address_Total_Subtotal extends Mage_Sales_Model_Quote_Address_Total_Subtotal

And then I enabled the module

<?xml version="1.0" encoding="UTF-8" ?>

No luck, the module is detected but the new class doesn't show up. Thank you!

  • What do you mean with "the module is detected"? How did you check it? Because with <codepool>local</codepool> (lowercase p) it cannot be loaded. – Fabian Schmengler Feb 17 '15 at 14:48
  • I mean that I can activate / desactivate the module in the backend – Pobe Feb 17 '15 at 15:00
  • That's what I suspected. You can activate/deactivate module output and actually all modules that are defined in app/etc/modules/ are listed there, even if they are not active or the code is missing or not found. – Fabian Schmengler Feb 17 '15 at 15:01

It could either be that another module is rewriting the class before you. Check other config.xml files for that.

Or the class is called directly instead of via the Mage god class.

new Mage_Sales_Model_Quote_Address_Total_Subtotal



Next to that codepool should be with camel case, so codePool and the tag in modules too.


Not sure if that is the direct cause of the issue but it might have negative effect :)

  • my money is on the codePool and on the modules subtag that should not be lowercase. – Marius Feb 17 '15 at 14:53
  • ahhh the times i've wasted minutes if not hours of my life on codepool... – Sander Mangel Feb 17 '15 at 14:58
  • 1
    change codepool to codePool, thanks, Lebernard_Vente was fine, stack formatted it. I've learn today :) – Pobe Feb 17 '15 at 15:15

Hi I have faced same problem in my going projects in sales->ordergrid .Ihave used below extension for which third party module is overriding


MySkype: kinex.sourav .join me

Email Address:kinexmediamagento@gmail.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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