with this code (config.xml on my custom module):


I override successfully the first model (Mage_Core_Model_Email_Template). But the second, Mage_Core_Model_Email_Template_Mailer not works... why? Thanks!

1 Answer 1


Here are some common overwrite issues that you can look out for:

  • Wrong class definition. Your class should be something like class Company_Pluginname_Model_Email_Template_Mailer extends Mage_Core_Model_Email_Template_Mailer
  • Wrong class file name. Your class file should be case sensitive app/code/[community|local]/Company/Pluginname/Model/Email/Template/Mailer.php
  • Cache not cleared after config.xml changes
  • Module dependencies not properly configured in the module definition XML files. In your case, in app/etc/modules/Company_Pluginname.xml you should have a <depends><Mage_Core /></depends> node.
  • Overwritten resource is already overwritten by another module. You could grep the PHP code for the base class name Mage_Core_Model_Email_Template_Mailer, or config.xml files for email_template_mailer to check if this is the case


  • Thanks for your reply. I made everything fine, but I forgot the <depends> node on config xml.
    – Infocurci
    Commented Aug 4, 2015 at 15:44

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.