您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程

ecshop商品列表页怎么增加品牌

怀萍2023-11-15 19:52:54ecshop商城教程已有人查阅

导读1、打开category.php文件;2、修改 themes/default/library/goods_list.lbi在你想要显示品牌的地方加入 {$goods.brand_name}

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}

本文标签:

很赞哦! ()

留言与评论 (共有 条评论)
验证码:

本栏推荐

相关标签