关于微擎应用扫码点餐购物车自动增加6元的问题所在,只有一个文件,而且非常简单!
如下,先放上文件路径和代码。
路径:weisrc_dish/inc/mobile/updatedishnumofcategory.inc.php
部分代码:
$totalcount = 0;
$totalprice = 0;
$goodscount = 0;$cart = pdo_fetchall("SELECT * FROM " . tablename($this->table_cart) . " WHERE storeid=:storeid AND from_user=:from_user AND weid=:weid", array(':storeid' => $storeid, ':from_user' => $from_user, ':weid' => $weid));
$cart_html = '<ul>';
foreach ($cart as $key => $value) {
$goods_t = pdo_fetch("SELECT * FROM " . tablename($this->table_goods) . " WHERE id = :id LIMIT 1 ", array(':id' => $value['goodsid']));
if (!$this->getmodules()) {$value['price'] = floatval($value['price']) + 6;} //问题就是这个+6,把6改为0咯
$cart[$key]['goodstitle'] = $goods_t['title'];
$totalcount = $totalcount + $value['total'];
$totalprice = $totalprice + $value['total'] * $value['price'];
就是上面备注的地方,用DW工具打开的话,在185行附近
直接改掉 + 6 改为 +0 试试看呢?