Post by Unknown » Sat Jul 25, 2009 6:32 pm

My site is getting there slowly but surely! Anyway, I'm adding the optional logo to the Manufacturer section but don't actually see it anywhere on the front end, even when I select the particular brand in the drop down list?

Cheers guys.

http://www.virusclothing.co.uk / http://www.viruselectronics.co.uk


New member

Posts

Joined
Fri Jul 24, 2009 4:56 am


New member

Posts

Joined
Fri Jul 24, 2009 4:56 am


Post by slawrence10 » Sun Jul 26, 2009 5:29 am

In the Manufacturer Module at the side I have it displaying the logos instead of the drop down box.
as so www.barnardsports.co.uk

I done it by calling the images like so:

Code: Select all

<img src="image/<?php echo $manufacturer['image']; ?>
in
catalog/view/theme/default/template/module/manufacturer.tpl

Scott Lawrence - Creative agency - Bespoke web and graphic design


User avatar
Active Member

Posts

Joined
Sun Jul 19, 2009 8:10 pm
Location - London, UK

Post by Unknown » Sun Jul 26, 2009 7:09 am

That looks pretty cool, Scott. Do the images all have to be the same size or will they be resized automatically?

Cheers.

http://www.virusclothing.co.uk / http://www.viruselectronics.co.uk


New member

Posts

Joined
Fri Jul 24, 2009 4:56 am


Post by slawrence10 » Mon Jul 27, 2009 6:35 am

Thanks :)

if you just specify the width you want in the image tag then it will just display them at the shrunk width...

This is my whole code for catalog/view/theme/default/template/module/manufacturer.tpl

Code: Select all

<div class="box">
<div class="top">
    <img src="catalog/view/theme/default/image/icon_brands.png" alt="" />
    <?php echo $heading_title; ?>
</div>

<div style="text-align: right;">
      <?php foreach ($manufacturers as $manufacturer) { ?>
          <a href="<?php echo $manufacturer['href']; ?>">
         <img src="image/<?php echo $manufacturer['image']; ?>" border="0" [b]width="100"[/b]>
         </a>
      <?php } ?>
</div>
<div class="bottom">&nbsp;</div>
</div>
I've changed some of the styles for the div classes like box top. So if you put this code in the only difference I think you will get is that it will be surrounded by the normal module box outline.

Scott Lawrence - Creative agency - Bespoke web and graphic design


User avatar
Active Member

Posts

Joined
Sun Jul 19, 2009 8:10 pm
Location - London, UK

Post by Unknown » Mon Jul 27, 2009 6:38 am

I'll try it and let u know how it looks!

http://www.virusclothing.co.uk / http://www.viruselectronics.co.uk


New member

Posts

Joined
Fri Jul 24, 2009 4:56 am


Post by cowpoke McStink » Fri Aug 14, 2009 6:11 am

Not sure if this has been corrected in a later post, but the code given above seems to need a little tweaking, and another file needs to be edited in order to pull the manufacturer image.

First off go into the catalog/controller/module/manufacturer.php file and add the following

Code: Select all

'image'            => $result['image'],
This code goes into the

Code: Select all

foreach ($results as $result) {
loop. I put it right above the 'href' and below the 'name' declarations.

This will allow you to pull the image name in the yourtheme/template/module/manufacturer.tpl

I have not edited the stylesheets and found that the following code within the template file looks good.

Code: Select all

    <div class="box">
    <div class="top">
        <img src="catalog/view/theme/default/image/icon_brands.png" alt="" />
        <?php echo $heading_title; ?>
    </div>
    <div class="middle" style="text-align: center">
          <?php foreach ($manufacturers as $manufacturer) { ?>
              <a href="<?php echo $manufacturer['href']; ?>">
             <img src="image/<?php echo $manufacturer['image']; ?>" border="0" width="100">
             </a>
          <?php } ?>
    </div>
    <div class="bottom">&nbsp;</div>
    </div>
Hopefully these two addendum's will help others get this working correctly.

On another note, this is my very first post, and the first time I have looked under the hood of opencart. I am by no means a real programmer, more of a tinkerer, and I must say that the ease of editing and understanding the opencart system is pretty cool.

-Cowpoke McStink

User avatar

Posts

Joined
Fri Aug 14, 2009 6:01 am
Location - The Vast Deserts of California

Post by Qphoria » Fri Aug 14, 2009 8:23 am

i also made a quick little mod to add images to the select box if you're looking for something like that. You can see and get it here:
http://www.unbannable.com/ocstore/index ... duct_id=64

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by rebecca » Tue Dec 07, 2010 6:20 pm

Hooray! Thanks for sharing cowpoke :)

New member

Posts

Joined
Thu Jul 15, 2010 9:54 pm

Post by aaron1988 » Sun Jul 10, 2011 5:00 am

Thats cool thanks for this contribution :).

As it was just what was looking for.

Kind Regards,
Aaron

Active Member

Posts

Joined
Thu Jan 27, 2011 10:03 am
Who is online

Users browsing this forum: No registered users and 23 guests