Ecshop achieves product list page attribute filtering area brand filtering in the form of Logo display

Source: Internet
Author: User

In many cases, the brands on the ecshop category page are displayed in the form of names. The following ecshop development center technology tells you how ecshop achieves product list page attribute filtering area brand filtering and displays it in the form of Logo

1. Modify the category. php file (about 220 rows)
Find

1 $sql = "SELECT b.brand_id, b.brand_name, COUNT(*) AS goods_num ".

Replace

1 $sql = "SELECT b.brand_id,b.brand_logo, b.brand_name, COUNT(*) AS goods_num ".

2. In (about 232 rows)
Find

1 $brands[$temp_key][‘brand_name‘] = $val[‘brand_name‘];

Add

1 $brands[$temp_key][‘brand_logo‘] = $val[‘brand_logo‘];

3. In (approximately 242 rows or 246 rows)

Find

1 $brands[0][‘brand_name‘] = $_LANG[‘all_attribute‘];

Add

1 $brands[0][‘brand_logo‘]=‘‘;

4. Modify the category. DWT file search

1 <span>{$brand.brand_name}</span>

Replace:

12 <span>{if $brand.brand_logo}"/data/brandlogo/{$brand.brand_logo}" width="40px"height="40px">                  {else}{$brand.brand_name}{/if}</span>

5. Continue to find

1 <a href="{$brand.url}">{$brand.brand_name}</a>

Replace

1234 <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}"data/brandlogo/{$brand.brand_logo}" width="172" height="60" >{else}{$brand.brand_name}{/if}</a></div>

Note: the size of the brand logo has been defined in step 1, with width = 5th Height = 60. You can adjust the size of your logo based on your own situation.

6. Add a CSS style and open style.css to put the following code at the bottom of it.

1234 div.akl:hover{filter:alpha(opacity=50);-moz-opacity: 0.5;opacity: 0.5;}

Ecshop achieves product list page attribute filtering area brand filtering in the form of Logo display

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.