I am trying to create a magento catalogue price rule with condition combined using 'any' instead of 'all'
The following code creates a rule with two conditons - but they are combined using all. Does anyone know how to achieve this? I'm using magento 1.7.0.2 (Community Edition)
$skuCondition = Mage::getModel('catalogrule/rule_condition_product')
->setType('catalogrule/rule_condition_product')
->setAggregator('any')
->setAttribute('category_ids')
->setOperator('==')
->setValue('18');
$skuCondition2 = Mage::getModel('catalogrule/rule_condition_product')
->setType('catalogrule/rule_condition_product')
->setAttribute('category_ids')
->setOperator('==')
->setValue('40');
$catalogPriceRule->getConditions()->addCondition($skuCondition);
$catalogPriceRule->getConditions()->addCondition($skuCondition2);
$catalogPriceRule->save();