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

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

当前位置: 主页>网站教程>Ecshop教程> 修ecshop品牌筛选以LOGO图片形式显示
分享文章到:

修ecshop品牌筛选以LOGO图片形式显示

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

 如何实现商品列表页属性筛选区品牌筛选以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图片形式显示 !

打赏

打赏

取消

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

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

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

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

相关文章

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

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板