Apply Catalog Price Rules programmatically

1.9k Views Asked by At

I tried with this:

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

$catalogPriceRule->applyAll();

But it doesn´t work.

1

There are 1 best solutions below

0
On

Try Like this

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