ecshop教程:修改ecshop品牌筛选以LOGO图片形式显示

2016-07-10 570

ecshop教程:修改ecshop品牌筛选以LOGO图片形式显示!如何实现商品列表页属性筛选区品牌筛选以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}" rel="external nofollow"  rel="external nofollow" >{$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}" rel="external nofollow"  rel="external nofollow"  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图片形式显示 !

声明: 本站仅提供资源学习下载,资源费用仅为赞助站长的整理费,不代表资源自身价值也不包含任何服务。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
本站提供的资源来自网络,版权争议与本站无关,所有内容及软件的文章仅限用于学习和研究目的。
如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。侵删请致信E-mail:duhaomu@163.com

浩沐资源网 ecshop技巧 ecshop教程:修改ecshop品牌筛选以LOGO图片形式显示 https://www.dhaomu.com/5507.html

相关文章

发表评论
暂无评论
  • 0 +

    访问总数

  • 0 +

    会员总数

  • 0 +

    文章总数

  • 0 +

    今日发布

  • 0 +

    本周发布

  • 0 +

    运行天数

浩沐资源网-打造全网优质免费教程资源分享网站!