app\code\core\Mage\Eav\Model\Entity\Increment\Numeric.php
public function getNextId()
{
$last = $this->getLastId();
if(!$last){$last=10000000;}
return $showtime = date("ymdHis").sprintf("%03d",mt_rand(0, 999));
if (strpos($last, $this->getPrefix()) === 0) {
<span></span>$last = (int)substr($last, strlen($this->getPrefix()));
} else {
$last = (int)$last;
}
$next = $last+1;
return $this->format($next);
}
这里有个问题就是magento在获取最新订单号的时候,会有转换为int型,如果订单号规则有字母前缀,就转化成0,这样就出错了,具体修改 |