I tried to rewrite the Mage_CatalogRule_Helper_Data.
But somehow my code is not used instead of the original helper.
Can someone please point out the error I have made so I can understand what went wrong, how to do it correct and so I can learn to rewrite more correctly in future.
Btw. as far as I can see the module is activated, so the Test_CatalorRule.xml should be correct.
\app\etc\modules\Test_CatalogRule.xml
<config>
<modules>
<Test_CatalogRule>
<active>true</active>
<codepool>local</codepool>
</Test_CatalogRule>
</modules>
</config>
\app\code\local\Test\CatalogRule\etc\config.xml
<config>
<modules>
<Test_CatalogRule>
<version>1.0.0</version>
</Test_CatalogRule>
</modules>
<global>
<helpers>
<catalogrule>
<rewrite>
<data>Test_CatalogRule_Helper_Data</data>
</rewrite>
</catalogrule>
</helpers>
</global>
</config>
\app\code\local\Test\CatalogRule\Helper\Data.php
class Test_CatalogRule_Helper_Data extends Mage_CatalogRule_Helper_Data
{
public function calcPriceRule($actionOperator, $ruleAmount, $price)
{
return 42;
}
}
Thanks for any help
codepool
should be with a capital P. Is your extension showing up underSystem > Configuration > Advanced
, i.e. is it properly installed?