php核销次数,人人商城记次时商品核销时展示剩余积分 - YangJunwei
人人商城記次時商品有很多二開方案,有一客戶就要求在核銷時,扣除相應的積分。今天我們在記次時商品核銷時展示剩余積分。
我們打開如下文件
ewei_shopv2/core/mobile/verify/verifygoods.php
找到 detail() 函數中的如下語句
$item = pdo_fetch('select vg.*,g.id as goodsid ,g.title,g.subtitle,g.thumb,vg.storeid from ' . tablename('ewei_shop_verifygoods') . " vg inner join " . tablename('ewei_shop_order_goods') . " og on vg.ordergoodsid = og.id inner join " . tablename('ewei_shop_goods') . " g on og.goodsid = g.id where vg.id =:id and vg.verifycode=:verifycode and vg.uniacid=:uniacid and vg.invalid=0 limit 1", array(':id' => $id, ':uniacid' => $_W['uniacid'], ':verifycode' => $verifycode));
在其下一行添加如下代碼
$u_openid = $item['openid'];
$credit = m('member')->getCredit($u_openid);
接著打開前端如下文件
ewei_shopv2/template/mobile/default/verify/verifygoods/detail.html
在任意想調用的位置輸入
剩余積分:{php echo $credit}
此教程僅此,其他延伸看后續吧!
總結
以上是生活随笔為你收集整理的php核销次数,人人商城记次时商品核销时展示剩余积分 - YangJunwei的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 美图手机被小米收购了吗(汉典美字的基本解
- 下一篇: ps图层混合模式在哪里