ECSHOP商品列表页商品显示商品品牌

2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家

通过本教程实现ECSHOP商品列表中每个商品都显示品牌第一步:打开根目录gh  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'];第二步:在商品列表库文件  /themes/default/library/goods_list.lbi  中使用以下代码调用品牌名称。{$goods.brand_name}