Cms技巧
分享创造价值 合作实现共赢

Cms技巧

当前位置: 首页 > 新闻动态 > Cms技巧

ECSHOP中销售排行显示会员价格方法

发布时间:2019-12-16 11:16:56作者:admin点击:

修改方法:

打开 includes/lib_goods.php文件找到
$arr[$i]['price'] = price_format($arr[$i]['shop_price']);

把它修改为下面代码即可

代码如下

$arr[$i]['price'] = price_format($GLOBALS['db']->getOne("select if NULL(mp.user_price, d.shop_price * '$_SESSION[discount]') as price from ".$GLOBALS['ecs']->table['goods']."as d left join".$GLOBALS['ecs']->table('member_price')." as mp on mp.goods_id = d.goods_id and mp.user_rank = '$_SESSION[user_rank]' where d.goods_id = ".$arr[$i]['goods_id']));

TOP

QQ客服

18910140161