使用Ecshop给客户做了一个商城系统,在测试时发现后台在更改订单的配送方式时出现了以下问题 "PHP Warning: number_format() expects parameter 1 to be double, string given in C:\inetpub\wwwroot\includes\lib_common.php on line 973" 在查看源码的时候并没有发现问题,然后就把$price的打印了出来也没有发现问题,此时$price的值为:string(4)…
很多做电子商务站的朋友都问我,在ecshop中,里面有个 assign_dynamic('index');这个到底是什么作用来的,这个其实是ecshop中的模板技术,动态处理一些局部信息更新而不被缓存的机制. 先看 assign_dynamic()函数,$sql = 'SELECT id, number, type FROM ' . $GLOBALS['ecs']->table('template') . " WHERE filename = '$tmp' AND type > 0…