JSON

翻页报错can't parse to JSON

字号+ 作者:H5之家 来源:H5之家 2017-07-26 13:01 我要评论( )

请教:nbsp; nbsp; nbsp; nbsp; 在ecshop管理后台=促销管理=专题管理,翻页时报错如下所示:nbsp; nbsp; nbsp; nbsp; uncaught exception: [Excep ...

在很多页面添加购物按钮后,点击时会出现例外被抛出,根据我的错误提示
uncaught exception: [Exception... "'transport.js/parseResult() error: can't parse to JSON. <br /> <b>Warning</b>: number_format() expects parameter 1 to be double, string given in <b>D:\wamp\www\ecshop\includes\lib_common.php</b> on line <b>965</b><br /> {"error":6,"message":[{"attr_type":"1","name":"\u989c\u8272","attr_id":"185","values":[{"label":"\u9ed1\u8272","price":"","format_price":"\uffe5\u5143","id":"196"},{"label":"\u91d1\u8272","price":"10","format_price":"\uffe510.00\u5143","id":"197"},{"label":"\u767d\u8272","price":"20","format_price":"\uffe520.00\u5143","id":"198"}]}],"content":"","goods_id":"19","parent":0}' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: chrome://firebug/content/spy.js :: callPageHandler :: line 744" data: no]

找到\includes\lib_common.php下的964行
$price = number_format($price,2, '.', '');
改成        
//$price = number_format((double)$price,2, '.', '');即可
希望对你有帮助

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • ECSHOP中实现ajax弹窗登录功能

    ECSHOP中实现ajax弹窗登录功能

    2017-04-19 16:00

  • ecshop软件的商品颜色尺寸属性、仿淘宝选择功能简介

    ecshop软件的商品颜色尺寸属性、仿淘宝选择功能简介

    2015-10-10 12:35

网友点评