I'm working on Magento 1.9

I can see I have 2 options to rewrite a mage file . First, I just copy the file with the same path in local/mage/.... Second, I use a module and rewrite my method using etc/config.xml

Why there is 2 options ? When should I use the first one , and when should I use the second one ?

Thanks for your answers

2 Answers 2


Briefly :

  • I use override if this is a Magento Core Bug correction. I copy/paste the file in the local pool and just add a comment in top of the file to explain the bug and his correction (most of times there is a link to a stackoverflow question ...)

  • I use rewrite if I have to add or modify a feature (and when this is not possible to do this with an event/observer)


You should do the difference between override and rewrite

rewrite = is when you rewrite: controllers, models, blocks, via xml

override = is when you copy the file from app/code/core to app/code/local

All rewrites are overrides, but not all overrides are rewrites, for exemple tha abstract classes, we can't rewrite them but, we can override.

More informations in benmarks explanation.

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.