Warning: Undefined array key "night" in /www/wwwroot/dhaomu.com/wp-content/themes/b2/header.php on line 18

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

ecshop教程:ecshop商品列表页显示每个商品的品牌!浩沐资源网为您整理,在Ecshop商品列表页显示每个商品的品牌的修改方法

ecshop教程:ecshop商品列表页显示每个商品的品牌!浩沐资源网为您整理,在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.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:duhaomu@163.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明

给TA赞赏
共{{data.count}}人
人已赞赏
编程技巧

织梦页面中调用当前会员登录信息

2021-10-19 0:00:00

编程技巧

织梦会员上传头像加水印方法

2021-10-21 0:00:00

0 条回复 A文章作者 M管理员

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914
----《》
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索