打开根目录下的 category.php 文件
1、查找(~ 860)
- $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, ' .
2、查找(~870)
- "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 " .
3、查找(~960)
- $arr[$row['goods_id']]['name'] = $row['goods_name'];
下方新增
- $arr[$row['goods_id']]['brand_name'] = $row['brand_name'];
打开模板库文件 /themes/主题名称/library/goods_list.lbi
需要展示品牌的位置添加 {$goods.brand_name}
,即会显示出该品牌的名称。