1.includes/lib_goods.php 288行修改成,(红色是添加内容)
$sql = 'SELECT b.brand_name,g.goods_id,g.goods_sn, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price,' .
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ".
"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img, RAND() AS rnd " .
'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('brand') . ' AS b ON b.brand_id = g.brand_id ' .
"LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]'";
2..includes/lib_goods.php 中 $goods[$idx]['brief'] = $row['goods_brief'];下面添加一行
$goods[$idx]['brand_name'] = $row['brand_name'];
3.首页index.dwt中 用{$goods.brand_name}调用
效果如下。可以连品牌一起调用出来咯
相关文章
ecshop出现Warning: Invalid argument supplied for foreach()错误2019-02-26
Ecshop 分类页产品列表不同分类调用不同产品属性2018-03-08
ECSHOP商品属性调用到任意页面方法2018-03-01
ECSHOP商品列表页显示每个商品的品牌2018-02-28
Ecshop 分类页品牌调用商品数量2018-02-28
ecshop调整默认商品图片排序2018-02-27
ecshop各个页面调用商品销售量方法2016-09-23
ecshop mobile首页循环显示分类及分类下商品2016-09-23
ecshop后台添加虚拟销量以及前台显示销量2016-09-22
ecshop重新导入数据库,管理员和密码正确登录失败2016-09-21