medina
medina

Reputation: 8159

New Arrival Products in Magento

My magento application use to change automatically the flag new arrival in all products as soon as they reach 2 weeks in the system. And now it is not happening anymore. The flag is located on Catalog > Manage Products > Tab Custom.

Could someone tell me where exactly in the code Magento sets this flag as true/false, please. And then I can investigate what is going on.

Thanks in advance.

Upvotes: 1

Views: 1260

Answers (1)

Francis Kim
Francis Kim

Reputation: 4285

As Bhavik Shah points out, it is likely the cron job is failing to run - try trigger the cron manually by hitting: http://yourstoreaddress.com/cron.php

Second step would be editing your cron.php in your store root to the below then turn on logging in System > Configuration > Developer > Log Settings:

Mage::app('admin')->setUseSessionInUrl(false);

try {
    Mage::getConfig()->init()->loadEventObservers('crontab');
    Mage::app()->addEventArea('crontab');
    Mage::dispatchEvent('default');
    Mage::log("Cron run"); //Add this line and you will get a log entry
} catch (Exception $e) {
    Mage::printException($e);
}

This will tell you if the cron job was run and when in /var/log/system.log

Obviously check your PHP and server logs for any errors - also check the exceptions log under /var/log/exception.log

All this will hopefully help you in finding the root cause of the problem.

Upvotes: 1

Related Questions