百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>Ecshop教程> ecshop商品列表页显示每个商品的品牌
分享文章到:

ecshop商品列表页显示每个商品的品牌

发布时间:12/03 来源: 浏览: 关键词:

魔客吧为您整理,在Ecshop商品列表页显示每个商品的品牌的修改方法


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}即可。

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有12人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板