各位网店系统用户大家好,欢迎来到ECSHOP教程网图文教程,今天为大家详细解说一下ECSHOP商品列表分类页的商品显示商家品牌修改方法。
ECSHOP教程网ECSHOP视频教程也再不断的完善与跟进,期待大家的关注!希望在ECSHOP的道路上,ECSHOP教程网与您一路同行!
1、首先修改 category.php 文件
将
| $sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' . |
修改为
| $sql = 'SELECT g.goods_id, g.goods_name, b.brand_name , g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' . |
找到
| "ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' " . |
在它下面增加一行
| " LEFT JOIN ". $GLOBALS['ecs']->table('brand') . " AS b on b.brand_id = g.brand_id " . |
继续,找到
| $arr[$row['goods_id']]['name'] = $row['goods_name']; |
在它下边增加一行
| $arr[$row['goods_id']]['brand_name'] = $row['brand_name']; |
2、
接下来打开模板库文件 /themes/default/library/goods_list.lbi
想在哪显示品牌就在哪加入下面的代码
{$goods.brand_name} |