客户在ecshop提交订单的时候报错:Warning: number_format() expects parameter 1 to be double, string given in…
出现这样的原因是配送插件里面的免费额度为0,,导致了$price的值为空值,直接调用number_format出现了错误。
ECSHOP开发中心()介绍下修改方法:打开includes\lib_common.php 搜索number_format 找到最下面的
将includes\lib_common.php else { $price = number_format($price, 2, ‘.’, ”); }
修改为
else { if(!$price){ $price = 0; } $price = number_format($price, 2, ‘.’, ”); }
人只要不失去方向,就不会失去自己