Page 1 of 1

Adding Manufacturer Images / Logo's

Posted: Fri Sep 23, 2011 9:37 pm
by Wardy_118
Hi,

Currently using opencart version 1.5.0 and am trying to get the manufacturer image to be displayed in 3 different areas.

1. I would like it to show on the Manufacturer page itself next to each name (index.php?route=product/manufacturer) as a small thumbnail.

2. Once you then click on one of the Manufacturers I would like the logo to appear next to the name of the Manufacturer at the top. (index.php?route=product/manufacturer/product&manufacturer_id=)

3. Then finally I would like a small thumbnail logo added to the product page itself next to the name of the Manufacturer (index.php?route=product/product&path=&product_id=)

I have search the forum and only really came across one post which was in relation to the above, but this was only in to do with the product tpl page:

http://forum.opencart.com/viewtopic.php ... er#p179611

I have gone through the 3 steps described by Amdev but I can't get the manufacturer logo to appear on the product page. Just comes up with a box with a cross in it.

Any help on this would be much appreciated

Thanks

Re: Adding Manufacturer Images / Logo's

Posted: Sat Sep 24, 2011 10:15 am
by amdev
Open this file (try to do 3 step before.)

Code: Select all

catalog/view/theme/your-theme/template/product/product.tpl
put this code in 1'st line of your product.tpl

Code: Select all

<?php print_r($mimage); ?>
your will see your manufacture image log like this.

Code: Select all

http://127.0.0.1/151/upload/image/cache/data/apple_logo-150x150.jpg

Re: Adding Manufacturer Images / Logo's

Posted: Sun Sep 25, 2011 10:11 pm
by Wardy_118
Hi Amdev,

I have now managed to get the manufacturer logo/image to appear on the individual product page. Not sure what was wrong with it before but works fine now.

Do you know how I go about getting the logo to also appear on the Manufacturer and Brand pages?

Thanks

Re: Adding Manufacturer Images / Logo's

Posted: Wed Dec 21, 2011 3:16 am
by mantisviii
i'm having the same problem :(

Re: Adding Manufacturer Images / Logo's

Posted: Fri Mar 16, 2012 10:08 am
by H2O
Using jimmyphong's awesome code from this thread on how to add the manufacturers logo to the Product Page:
http://forum.opencart.com/viewtopic.php ... 0&p=248127

I took elements of the code and used it to add the Manufacturer's logo to the Manufacturing Page. Here's what I did to add logos to the Manufacturing page in version 1.5.2.1:

Open file:

Code: Select all

catalog\controller\product\manufacturer.php
find code:

Code: Select all

$manufacturer_info = $this->model_catalog_manufacturer->getManufacturer($manufacturer_id);
Add after with code:

Code: Select all

$manufacturer_image = $this->model_catalog_manufacturer->getManufacturer($manufacturer_id);
         
         if($manufacturer_image){
            $this->data['manufacturers_img'] = $this->model_tool_image->resize($manufacturer_image['image'], 120, 120);
         }else{
            $this->data['manufacturers_img'] = false;
         }
Open file:

Code: Select all

catalog\view\theme\default\template\product\manufacturer_info.tpl
find code:

Code: Select all

<h1><?php echo $heading_title; ?></h1>
It's like 8 lines down from the top

after it, add this code:

Code: Select all

<?php echo ($manufacturers_img) ? '<img src="'.$manufacturers_img.'" alt="'.$manufacturers.'" />' : $manufacturers ;?><br />
and that's it!

The Manufacturers Logo should appear immediately under the Brand Name

Re: Adding Manufacturer Images / Logo's

Posted: Fri Jan 18, 2013 3:36 am
by AcidBurn
I couldn't get this to work I tried both the default and the custom theme I'm using