magento - Overwrite CompareController -


i try override core comparecontroller. somehow don't done. have done research on magento website: http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/how_to_overload_a_controller

but did not override controller.

local/wp/compare/etc/config.xml

<?xml version="1.0"?> <config>     <modules>         <wp_compare>             <version>0.1.0</version>         </wp_compare>     </modules>     <global>         <rewrite>             <wp_compare_catalog_product_compare>                 <from><![cdata[#^/catalog/product/compare/#]]></from>                 <to>/compare/catalog/product/compare/</to>             </wp_compare_catalog_product_compare>         </rewrite>     </global> </config> 

local/wp/catalog/controllers/product/comparecontroller.php

<?php  require_once "mage/catalog/controllers/product/comparecontroller.php"; class wp_compare_catalog_product_comparecontroller extends mage_catalog_product_comparecontroller {      public function addaction()     {         echo 'lets go!';     }  }  ?> 

can me issue?

thank you.

gr. lex

this solution problem.

<?xml version="1.0"?> <config>     <modules>        <wp_compare>            <version>0.1.0</version>        </wp_compare>     </modules>     <frontend>         <routers>             <catalog>                 <use>standard</use>                 <args>                     <modules>                         <wp_compare before="mage_catalog">wp_compare_catalog</wp_compare>                     </modules>                 </args>             </catalog>         </routers>     </frontend> </config> 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -