I try to override the magento Mage\\Catalog\\controllers\\ProductController.php with a module. In my module i try this:
\\etc\\config.xml
you can use like below
Edit you Package/Module/etc/config.xml
<?xml version="1.0"?>
<config>
... Your Other config here ....
<frontend>
<routers>
<catalog>
<args>
<modules>
<Package_Catalog before="Mage_Catalog">Package_Catalog</Package_Catalog>
</modules>
</args>
</catalog>
</routers>
</frontend>
</config>
Now your controller already ready.
include(Mage::getBaseDir()."/app/code/core/Mage/Catalog/controllers/ProductController.php");
class Package_Catalog_ProductController extends Mage_Catalog_ProductController
{
public function viewAction(){
echo __METHOD__;
}
}
?>