【发布时间】:2015-11-26 11:08:28
【问题描述】:
我是 Magento 编程的新手,遇到以下问题:
当我应用 Magento 补丁 6788 时,我无法再访问 www.siteurl.com/checkout/onepage/。
我认为这与以下几点有关:
<?php
class MW_Ddate_Model_Ddate extends Mage_Core_Model_Abstract
{
private $inexedDdates = null;
public function _construct()
{
parent::_construct();
$this->_init('ddate/ddate');
}
public function getNumberOrderFromNow() {
if(is_null($this->inexedDdates)) {
$timeFilter = strtotime('- 1 day');
$collection = $this->getCollection()
->addFieldToFilter('UNIX_TIMESTAMP(ddate)', array('gteq' => $timeFilter));
$ddateArray = array();
foreach ($collection as $ddate) {
$ddateArray[$ddate->getDtime()][$ddate->getDdate()] = $ddate;
}
$this->inexedDdates = $ddateArray;
}
return $this->inexedDdates;
}
}
?>
在日志文件中提到了->addFieldToFilter('UNIX_TIMESTAMP(ddate)'
我认为 UNIX_TIMESTAMP 在我打补丁时已被弃用。
有谁知道我该如何解决这个问题?
编辑: 我在 onepage 上使用的插件是 MageWorld 的交货日期
【问题讨论】:
标签: php magento magento-1.9