Opencart Version 1.5.1.3
I need some help on chaning how manufacturers display on the brands page. I want to show the logos rather than the manufacturer names. I also want to show the logo on the actual manufacturer's page.
Any help would be appreciated. Thanks in advance!
I need some help on chaning how manufacturers display on the brands page. I want to show the logos rather than the manufacturer names. I also want to show the logo on the actual manufacturer's page.
Any help would be appreciated. Thanks in advance!
Step One:
Open up catalog/controller/product/manufacturer.php and look for this line of code:
This code grabs the image and re-sizes it. You can set the width and height manually. Replace the code above with this entire block:
Step Two:
Now open up this file:catalog/view/theme/your_theme/template/product/manufacturer_list.tpl and find this line of code:
If you want to show only thumbnails then replace it with this:
If you want to show both:
Open up catalog/controller/product/manufacturer.php and look for this line of code:
Code: Select all
$this->data['categories'][$key]['manufacturer'][] = array(
'name' => $result['name'],
'href' => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id'])
);
Code: Select all
#width of thumbnail
$manufacturer_image_width = 50;
#height of thumbnail
$manufacturer_image_height = 50;
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $manufacturer_image_width, $manufacturer_image_height);
} else {
$image = false;
}
$this->data['categories'][$key]['manufacturer'][] = array(
'name' => $result['name'],
'image' => $result['image'],
'href' => $this->url->link('product/manufacturer/product', 'manufacturer_id=' . $result['manufacturer_id'])
);
Now open up this file:catalog/view/theme/your_theme/template/product/manufacturer_list.tpl and find this line of code:
Code: Select all
<li><a href="<?php echo $category['manufacturer'][$i]['href']; ?>"><?php echo $category['manufacturer'][$i]['name']; ?></a></li>
Code: Select all
<li><a href="<?php echo $category['manufacturer'][$i]['href']; ?>"><img src="<?php echo $category['manufacturer'][$i]['image']; ?>" alt="<?php echo $category['manufacturer'][$i]['name']; ?>" /></a></li>
Code: Select all
<li><a href="<?php echo $category['manufacturer'][$i]['href']; ?>"><?php echo $category['manufacturer'][$i]['name']; ?></a><br />
<a href="<?php echo $category['manufacturer'][$i]['href']; ?>"><img src="<?php echo $category['manufacturer'][$i]['image']; ?>" alt="<?php echo $category['manufacturer'][$i]['name']; ?>" /></a></li>
Ok it seems to be working fine, but the image path is not correct. it is trying to pull the images from (example) but they are actually in (example)
here is a link to the page:
http://www.highoctanemotoring.com/index ... nufacturer
Code: Select all
http://www.highoctanemotoring.com/data/Manufacturers/ACT_Logo.jpg
Code: Select all
http://www.highoctanemotoring.com/[b]image[/b]/data/Manufacturers/ACT_Logo.jpg
http://www.highoctanemotoring.com/index ... nufacturer
Who is online
Users browsing this forum: No registered users and 7 guests