y'all. What is the best way to achieve this epic feat of intellectual prowess?

Is this a good start?

class Company_adminhtml_Catalog_ProductController extends Mage_AdminhtmlCatalog_ProductController{

From that point, what else must be achieved?


In your controller

require_once 'Mage/Adminhtml/controllers/Catalog/ProductController.php';   
class Company_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController {


In your config.xml

                        <Company_Adminhtml before="Mage_Adminhtml">Company_Adminhtml</Company_Adminhtml>

See Magento: Overriding Core Files (Blocks, Models, Resources, Controllers)

| improve this answer | |

Magento won't find the controller as it would search for Mage/Customer/AccountController.php. I guess the only way is in fact require_once a controller php class file.

I think here you can find a complete solution for this.

The other, much less elegant way is to copy the whole controller you want to extend, and let it extend Mage_Core_Controller_Front_Action.

Edit: Or Mage_Adminhtml_Controller_Action for admin area controller.

| improve this answer | |

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.