>> I've described admin controller override in my previous post. You just need to change config.xml and controller page with this code :
<?xml version="1.0"?>
<config>
<modules>
<JR_Overridecontroller>
<version>1.0.0</version>
</JR_Overridecontroller>
</modules>
<frontend>
<routers>
<catalog><!-- Name of core module to be overridden -->
<args>
<modules>
<JR_Overridecontroller before="Mage_Catalog">JR_Overridecontroller_Catalog</JR_Overridecontroller><!-- Tell Magento to call our custom module before the Mage/Catalog module -->
</modules>
</args>
</catalog>
</routers>
</frontend>
</config>
and in your controller page :
<?php
include_once("Mage/Catalog/controllers/ProductController.php");
class JR_Overridecontroller_Catalog_ProductController extends Mage_Catalog_ProductController
{
public function editAction(){
// Here is your overridden controller method.....
}
}
?>
You can override any controller with the help of this.....
No comments:
Post a Comment