Friday 24 June 2011

Fixing Magento Catalog Price Rules Issue

To solve this issue, edit Cron.php (in the root installation directory).

try {
Mage::getConfig()->init()->loadEventObservers(’crontab’);
Mage::app()->addEventArea(’crontab’);
Mage::dispatchEvent(’default’);
$observ = Mage::getModel(’catalogrule/observer’);
$observ->dailyCatalogUpdate("0 1 * * *");

5 comments:

  1. The code is missing a couple of lines. The whole code is:

    try {
    Mage::getConfig()->init()->loadEventObservers('crontab');
    Mage::app()->addEventArea('crontab');
    Mage::dispatchEvent('default');
    $observ = Mage::getModel('catalogrule/observer');
    $observ->dailyCatalogUpdate("0 1 * * *");
    } catch (Exception $e) {
    Mage::printException($e);
    }

    ReplyDelete
  2. work like a charm, thank you so much

    ReplyDelete
  3. THis is so helpful! Got it finally working! THANK YOU !!!

    ReplyDelete
  4. Thanks a lot work like charm (life saving code)

    ReplyDelete
  5. Whether i have to give the first code or vassilis code ? Which code is perfect ?
    thanks!

    ReplyDelete