I have the raw product price in a variable and i want to be able to apply only a specific rule to it.
Right now what i am doing is iterating over all the rules, conditioning only the ones i want. What i have today (i simplified the code here):
$productPrice = $product->getPrice();
$catRul = Mage::getResourceModel('catalogrule/rule')-getRulesFromProduct(Mage::getModel('core/date')->date('Y-m-d'), $websiteId, $userGroupId, $data['entity_id']);
if(isset($catRul) && !empty($catRul)) {
foreach($catRul as $rule) {
$catalogRulObj = Mage::getModel('catalogrule/rule')->load($rule['rule_id']);
$ruleData = $catalogRulObj->getData();
if($ruleData['is_active'] === '1'){ // Here i am conditioning with a couple more stuff
// Here i want to apply this rule conditioned in $ruleData; only, not all like below \/
$productPrice = Mage::getModel('catalogrule/rule')->calcProductPriceRule($product, $product->getPrice());
}
}
}
Thank you very much.