I am trying to rewrite Mage_SalesRule_Model_Rule_Condition_Product_Subselect
but it seems like my changes are not being picked. Below is what i've done trying to rewrite the Model.
app/code/local/Invent/SalesRule/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Invent_SalesRule>
<version>0.0.1</version>
</Invent_SalesRule>
</modules>
<global>
<models>
<salesrule>
<rewrite>
<rule_condition_product_subselect>Invent_SalesRule_Model_Rule_Condition_Product_Subselect</rule_condition_product_subselect>
</rewrite>
</salesrule>
</models>
</global>
</config>
app/etc/modules/Invent_SalesRule.xml
<config>
<modules>
<Invent_SalesRule>
<active>true</active>
<codePool>local</codePool>
</Invent_SalesRule>
</modules>
</config>
app/code/local/Invent/SalesRule/Model/Rule/Condition/Product/Subselect.php
<?php
class Invent_SalesRule_Model_Rule_Condition_Product_Subselect extends Mage_SalesRule_Model_Rule_Condition_Product_Subselect
{
public function validate(Varien_Object $object)
{
// the code
}
}