1

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.

4

1 回答 1

1

正如 Bhavik Shah 指出的那样,cron 作业可能无法运行 - 尝试通过点击手动触发 cron:http: //yourstoreaddress.com/cron.php

第二步是将商店根目录中的 cron.php 编辑到下面,然后在系统 > 配置 > 开发人员 > 日志设置中打开登录:

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);
}

这将告诉您 cron 作业是否已运行以及何时运行/var/log/system.log

显然检查您的 PHP 和服务器日志是否有任何错误 - 还要检查下的异常日志/var/log/exception.log

所有这些都有望帮助您找到问题的根本原因。

于 2013-05-02T04:03:26.380 回答