I am trying to rewrite app/code/core/Mage/Catalog/controllers/Product/CompareController.php
. In my config.xml I have the following:
<frontend>
<routers>
<catalog>
<args>
<modules>
<Slice_CustomCompare before="Mage_Catalog">Slice_CustomCompare_Catalog_Product_Compare</Slice_CustomCompare>
</modules>
</args>
</catalog>
</routers>
</frontend>
and in app/code/local/Slice/CustomCompare/controllers/Product/CompareController.php
I have:
<?php
require_once(Mage::getModuleDir('controllers','Mage_Catalog').DS.'CompareController.php');
class Slice_CustomCompare_Product_CompareController extends Mage_Catalog_Product_CompareController {
public function removeAction() {
Mage::log('Slice_CustomCompare_Product_CompareController:removeAction');
}
}
?>
When I try to remove a product from the compare list I don't get Slice_CustomCompare_Product_CompareController:removeAction
in my logs. Instead I get output that I added to the method in the core code. What am I missing? Why is my rewrite not working?