Apply Catalog Price Rules programmatically

2k views Asked by At

I tried with this:

$catalogPriceRule = Mage::getModel(\’catalogrule/rule\’);

$catalogPriceRule->applyAll();

But it doesn´t work.

1

There are 1 answers

0
DRAJI On

Try Like this

Mage::getModel('catalogrule/rule')->applyAllRulesToProduct($productId);