首页商品显示品牌名称的修改 For 2.7
2016-07-07 16:18 来源:www.chinab4c.com 作者:ecshop专家
打开includes文件夹下的lib_goods.php文件,找到: function assign_cat_goods($cat_id, $num = 0, $from = 'web') 将原来的sql="...........省略........." 改为: $sql = 'SELECT g.goods_id, g.goods_name, g.market_price,g.brand_id,g.shop_price AS org_price, ' . "IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ". 'g.promote_price, promote_start_date, promote_end_date, g.goods_brief,br.brand_name, g.goods_thumb, g.goods_img ' . "FROM " . $GLOBALS['ecs']->table('goods') . ' AS g '. "LEFT JOIN " . $GLOBALS['ecs']->table('brand') ." AS br ". "ON g.brand_id = br.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]'". 'WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND '. 'g.is_delete = 0 AND (' . $children . 'OR ' . get_extension_goods($children) . ') ' . 'ORDER BY g.sort_order, g.goods_id DESC'; 找到: $goods[$idx]['brief']= $row['goods_brief']; 在下面增加: $goods[$idx]['brand_id']= $row['brand_id']; $goods[$idx]['brand_name']= $row['brand_name']; 然后再cat_goods.lbi模板文件中添加{$goods.brand_name}和{$goods.brand_id}标签调用就可以了 就像我的: <p><a href="brand.php?id={$goods.brand_id}" title="{$goods.brand_name}">{$goods.brand_name}</a></p> |
回答:
看起来不错哦,贴下演示地址看下 |
不错 支持下 |
支持了!!! |
很不错的修改小技巧 |
看起来很好,可惜没法演示! |
不错的修改方法 |
试过了,还是显示不出来! 1# coozu |
最近更新
常用插件
- ecshop的oss插件
ecshop的oss插件免费共享了,oss,ecshoposs...
- ecshop虚拟发货插件
ecshop虚拟发货插件介绍: ecshop虚拟发货插件,主要为了通过后台手动录...
- ecshop注册审核插件
ecshop插件介绍:ecshop会员注册审核插件,主要是在前台提供给注册的时候...
- ecshop订单聚合插件
ecshop订单聚合插件,主要是为了方便ecshop中订单产品到货情况的分析和...
- ecshop没登陆情况下订单查
ecshop没登陆情况下订单查询插件,主要是针对ecshop在没有登陆的情况下...
ecshop热门问答
ecshop热门资料
ecshop制作流程
ecshopwebim
ecshopECSHOP整站开发
ecshop奇货网
ecshoppage
zen_get_box_id函数
ecshop上架
ecshopunserialize
ecshopSHOPNC
ecshop能够
ecshop高手
ecshopM18
ecshopavailable
ecshop自适应
google订单跟踪
ecshop玩具店
500错误
ecshop模板
ecshop台式机
ecshop技术
ecshop验证码问题
ecshopdiscuz
ecshop专用订单处理
ecshop焦点
ecshop调试
ecshop付通
ecshopMYSQLadmin
ecshopchrome
ecshopViolation
ecshop快照