I am trying to rewrite app/code/core/Mage/Adminhtml/contollers/Catalog/ProductController.php. In my config.xml I have the following:
<?xml version="1.0"?>
<config>
<modules>
<Product_CustomProduct>
<version>0.1.0</version>
</Product_CustomProduct>
</modules>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<Product_CustomProduct before="Mage_Adminhtml">Product_CustomProduct</Product_CustomProduct>
</modules>
</args>
</adminhtml>
</routers>
</admin>
</config>
and in app/code/local/Product/CustomProduct/controllers/Catalog/ProductController.php I have:
<?php
include_once("Mage/Adminhtml/controllers/Catalog/ProductController.php");
class Product_CustomProduct_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController
{
/**
* Save product action
*/
public function saveAction()
{
echo 123456;
die;
}
}
I want to change saveAction function of core controller. But after product save my file echo is not working. My module is displayu on admin and it is enable. I dont know why my code is not working.
My newAction also not changed dont understand what is wrong in my structure.I dont want to change core file of magento.