您的位置:首页 > 运维架构

ecshop 后台订单出现number_format() expects parameter 1 to be double

2014-10-28 16:38 351 查看
1. ecshop  后台订单管理出现

      number_format() expects parameter 1 to be double, string given in E:\wamp\www\ecshopVjia\includes\lib_common.php on
line 963

 

         


 2,解决方法 : 

     (1)  

             function price_format($price, $change_price = true)

              {

                 $price = 0 + $price; //添加这一行,转换成数值

      (2)在lib_common.php on line 963
修改


   

  将includes\lib_common.php 的963行:

   else

    {

        $price = number_format($price, 2, '.', '');

    }

  修改为

    else

    {

        if(!$price){

                $price = 0;

        }

        $price = number_format($price, 2, '.', '');

    }

即可。原因是配送插件里面的免费额度为0,ec本身的bug导致了$price的值为空值,直接调用number_format出现了错误。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐