I face with problem that Magento's Catalog rules daily update doesn't work. This means that there are no products price changes when catalog rule's expire date comes, so I have to press rule apply button in Admin. Cron is configured and working. It seems that catalogrule/observer::dailyCatalogUpdate method should check and apply rules automatically every day, but it doesn't (also I've tried to launch it manually). Here is Magento core code:
<!--file: app/code/core/Mage/CatalogRule/etc/config.xml-->
<crontab>
<jobs>
<catalogrule_apply_all>
<schedule>
<cron_expr>*/1 * * * *</cron_expr>
</schedule>
<run>
<model>catalogrule/observer::dailyCatalogUpdate</model>
</run>
</catalogrule_apply_all>
</jobs>
...
</crontab>
Observer:
/*file app/code/core/Mage/CatalogRule/Model/Observer.php*/
public function dailyCatalogUpdate($observer)
{
Mage::getResourceSingleton('catalogrule/rule')->applyAllRulesForDateRange();
return $this;
}
I had a success modifying observer method as below:
/*file app/code/core/Mage/CatalogRule/Model/Observer.php*/
public function dailyCatalogUpdate($observer)
{
Mage::getModel('catalogrule/rule')->getResourceCollection()
->walk(array(
Mage::getResourceSingleton('catalogrule/rule'),
'updateRuleProductData'
));
Mage::getResourceSingleton('catalogrule/rule')->applyAllRulesForDateRange();
return $this;
}
This way rules are checked and applied every day and products prices are being changed if rule expire. I don't believe that it is a bug of Magento. Please, advise what is the problem that rules are not being checked and applied automatically?