I have 2 files need to be overload
core/Mage/Admin/Model/Session.php
and
core/Mage/Adminhtml/controllers/IndexController.php
I already copy it to local
with same structure, but the bad news is it wasn't overloaded. I can overload Block
in local
folder before. Now, I want to know why and how to do it.
Best Answer
Copying files to
local
code pool will only work for blocks, helpers and models. You cannot override controllers using this method since they are not autoloaded like other classes.So the only way to do it is via custom module. You will need following definition in your
config.xml
And in your controller class you need to add this:
Your controller class should be in
local/Foo/Bar/controllers/Adminhtml/IndexController.php