分类分类
更新时间:2026-02-18 20:28:31作者:fang
如何实现商品列表页属性筛选区品牌筛选以LOGO形式展示,总结ecshop教程入下:
1、修改 category.php 文件,将(大概215行)
$sql = "SELECT b.brand_id,b.brand_logo, b.brand_name, COUNT(*) AS goods_num ".
在(大概227行)
$brands[$temp_key]['brand_name'] = $val['brand_name'];
下面增加
$brands[$temp_key]['brand_logo'] = $val['brand_logo'];
在(大概242行)
$brands[0]['brand_name'] = $_LANG['all_attribute'];
下面增加
$brands[0]['brand_logo']='';
2、修改 category.dwt 文件将
<span>{$brand.brand_name}</span>
修改为
<span>{if $brand.brand_logo}<img src="/data/brandlogo/{$brand.brand_logo}" width="40px" height="40px">{else}{$brand.brand_name}{/if}</span>
将
<a href="{$brand.url}">{$brand.brand_name}</a>
修改为
<div class="akl" style="margin-left:2px;min-height:0px; margin-top:5px; width:178px; height:60px; border:1px dotted #009900;
display: -moz-inline-stack;
display: inline-block; vertical-align:bottom;text-align:center;
zoom:1;
*display:inline;
"><a href="{$brand.url}" style="">{if $brand.brand_logo}<img src="data/brandlogo/{$brand.brand_logo}" width="172" height="60" >{else}{$brand.brand_name}{/if}</a></div>
3.添加CSS样式
div.akl:hover{filter:alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
}
4.完成,修ecshop品牌筛选以LOGO图片形式显示 !
相关
归墟战纪策略游戏262.92 MBv3.95802026-02-14
下载爆裂老奶策略游戏209.43 MBv1.0.112026-02-14
下载超能下蛋鸭策略游戏395.4 MBv1.2.82026-02-14
下载你好盒子实用工具12.1 MBv2.2.852026-02-14
下载我在峡谷当牛马休闲益智87.95 MBv0.7.12026-02-14
下载抽卡监狱2策略游戏190.75 MBv1.4.92026-02-14
下载Campus社交通讯94.36 MBv1.19.02026-02-14
下载冒险传奇角色扮演141.73 Mv9991.12026-02-14
下载心动次元app社交通讯43.96 Mv1.0.1.32026-02-14
下载致亲爱的我角色扮演1.63Gv1.02026-02-14
下载狼伴侣游戏手机版冒险游戏155.6 Mv1.02026-02-14
下载Loclike社交通讯169.08 Mv2.2.112026-02-14
下载










