$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'];
第二步:版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: ecshop商品列表页商品显示商品品牌