给ECSHOP后台商品列表每个商品显示会员等级价格
2016-09-02 16:28 来源:www.chinab4c.com 作者:ecshop专家
1、打开修改admin/includes/lib_goods.php文件,找到如下代码: return array(\'goods\' => $row, \'filter\' => $filter, \'page_count\' => $filter[\'page_count\'], \'record_count\' => $filter[\'record_count\']); 在以上这段代码的前面添加以下代码: foreach ($row as $key_tmp => $goods_tmp) { $sql = \"SELECT rank_id, INULLmp.user_price, r.discount * $goods_tmp[shop_price] / 100) AS price, r.rank_name, r.discount \" . \'FROM \' . $GLOBALS[\'ecs\']->table(\'user_rank\') . \' AS r \' . \'LEFT JOIN \' . $GLOBALS[\'ecs\']->table(\'member_price\') . \" AS mp \". \"ON mp.goods_id = \'$goods_tmp[goods_id]\' AND mp.user_rank = r.rank_id \" . \"WHERE r.show_price = 1 OR r.rank_id = \'$_SESSION[user_rank]\'\"; $res_up = $GLOBALS[\'db\']->query($sql); while ($row_up = $GLOBALS[\'db\']->fetchRow($res_up)) { $row[$key_tmp][\'user_price\'][$row_up[\'rank_id\']] = array( \'rank_name\' => htmlspecialchars($row_up[\'rank_name\']), \'price\' => price_format($row_up[\'price\'])); } } 2、打开修改admin/templates/goods_list.htm文件,找到如下代码:
{/foreach}
最近更新
常用插件
- ecshop2.7.2生成虚拟订单2.
以前我们开发过ecshop下的虚拟订单,就是客户在访问的时候,会自动生...
- ecshop2.7.1邮件发送插件
ecshop2.7.1邮件发送插件:该插件主要的开发思想是源于ecshop短信发送系统...
- ecshop没登陆情况下订单查
ecshop没登陆情况下订单查询插件,主要是针对ecshop在没有登陆的情况下...
- ecshop二次开发商品购买增
图片1香...
- ecshop最小购买数量控制插
ecshop最小购买数量控制插件,这个插件主要是为我们提供一个十分方便...