计算人人商城会员价与游客价的差额

211 阅读1分钟

逻辑

代码位置: /addons/ewei_shopv2/plugin/app/core/mobile/goods.php

查询产品游客价与会员价

$goods = pdo_fetch("select id,thumb,title,marketprice,productprice,minproductprice,maxproductprice,total,maxbuy,minbuy,unit,isdiscount,isdiscount_time,isdiscount_discounts,isdiscount_time_start,hasoption,showtotal,diyformid,diyformtype,cannotrefund,diyfields,discounts, `type`, isverify, maxprice, minprice, merchsale,hascommission,nocommission,commission,commission1_rate,marketprice,commission1_pay,preselltimestart,presellovertime,presellover,ispresell,preselltimeend,presellprice,isnodiscount from " . tablename("ewei_shop_goods") . " where id=:id and uniacid=:uniacid limit 1", array(":id" => $id, ":uniacid" => $_W["uniacid"]));

计算vip级差

//计算vip级差
$goods['vipjl']=round($goods["minprice"]-$goods["minproductprice"],2);