$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, ' .
繼續(xù)查找:
"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 " .
繼續(xù)查找:
$arr[$row['goods_id']]['name'] = $row['goods_name'];
在下面新增一行加入以下代碼:
$arr[$row['goods_id']]['brand_name'] = $row['brand_name'];
第二步:版權聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權益請與我們聯(lián)系,我們將在24小時內刪除!謝謝!
轉載請注明: ecshop商品列表頁商品顯示商品品牌