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.
Cheers guys.
http://www.virusclothing.co.uk / http://www.viruselectronics.co.uk
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:
in
catalog/view/theme/default/template/module/manufacturer.tpl
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']; ?>
catalog/view/theme/default/template/module/manufacturer.tpl
Scott Lawrence - Creative agency - Bespoke web and graphic design
That looks pretty cool, Scott. Do the images all have to be the same size or will they be resized automatically?
Cheers.
Cheers.
http://www.virusclothing.co.uk / http://www.viruselectronics.co.uk
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
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.

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"> </div>
</div>
Scott Lawrence - Creative agency - Bespoke web and graphic design
I'll try it and let u know how it looks!
http://www.virusclothing.co.uk / http://www.viruselectronics.co.uk
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
This code goes into the
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.
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
First off go into the catalog/controller/module/manufacturer.php file and add the following
Code: Select all
'image' => $result['image'],
Code: Select all
foreach ($results as $result) {
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"> </div>
</div>
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
Newbie
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
http://www.unbannable.com/ocstore/index ... duct_id=64
Who is online
Users browsing this forum: No registered users and 23 guests