Post by Wardy_118 » Fri Sep 23, 2011 9:37 pm

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

New member

Posts

Joined
Tue Apr 13, 2010 5:50 pm

Post by amdev » Sat Sep 24, 2011 10:15 am

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

ร้านค้าออนไลน์
OpenCart Thailand Support Forum
How to Upgrade oc1.5 to 2.0.1.1
Upgrading OpenCart From v.1.4 or v.1.5 to V.2.2 Step by step


User avatar
Active Member

Posts

Joined
Fri Nov 27, 2009 3:40 pm
Location - Bangkok - Thailand

Post by Wardy_118 » Sun Sep 25, 2011 10:11 pm

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

New member

Posts

Joined
Tue Apr 13, 2010 5:50 pm

Post by mantisviii » Wed Dec 21, 2011 3:16 am

i'm having the same problem :(

Newbie

Posts

Joined
Tue Dec 13, 2011 9:13 am

Post by H2O » Fri Mar 16, 2012 10:08 am

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

A good site for e-commerce advice.


H2O
New member

Posts

Joined
Wed Feb 29, 2012 7:36 am

Post by AcidBurn » Fri Jan 18, 2013 3:36 am

I couldn't get this to work I tried both the default and the custom theme I'm using

Newbie

Posts

Joined
Wed Dec 05, 2012 6:19 am
Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 77 guests