When you want to change the behavior of the Magento core modules, which of the following method is acceptable?

  • Patching the core files.
  • Overriding a class by XML rewrite.
  • Move core modules into local directory and apply your changes.
  • Overriding a class by copying the core file to a local directory.