Forums / Templates, Stylesheets, Page Layout / Using Manufacturers Images In Sidebox

Using Manufacturers Images In Sidebox

Locked

Started by andystyler on 17 Jul 2006, 2:00 PM · Views: 1,929

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
17 Jul 2006, 2:00 PM
#1
andystyler avatar

andystyler

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Using Manufacturers Images In Sidebox

Hi everyone,

Been asked by a customer to change the Manufacturers menu to a list one, did that ok but now he wants me to use the Manufacturers Images instead. I'm stuck, can anyone help?

thanks

Andy.

17 Jul 2006, 2:06 PM
#2
andystyler avatar

andystyler

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Re: Using Manufacturers Images In Sidebox

<?php $content = ""; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n"; $content .= '<div class="betterCategories"><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">'; for($i = 1; $i < count($manufacturer_sidebox_array); $i++) { $content .= '<a href="index.php?manufacturers_id=' . $manufacturer_sidebox_array[$i]['id'] . '&main_page=index">'; $content .= $manufacturer_sidebox_array[$i]['text']; $content .= "</a>\n<br />\n"; } ?>

This is the current code which produces the 'list'

25 Jul 2006, 10:11 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Using Manufacturers Images In Sidebox

You'd have to alter the module, not just the template.

  • add m.manufacturers_image to the 2 select statements:```
    select m.manufacturers_id, m.manufacturers_name...

- change the array contents that's displayed via the template to use the image:

$manufacturer_sidebox_array[] = array('id' => '', 'text' => zen_image(DIR_WS_IMAGES . $manufacturer_sidebox->fields['manufacturers_image'], $manufacturer_sidebox->fields['manufacturers_name']) );

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

10 Sep 2008, 4:36 AM
#4
tipada avatar

tipada

New Zenner

Join Date:
Sep 2008
Location:
Toronto
Posts:
5
Plugin Contributions:
0

Re: Using Manufacturers Images In Sidebox

Followed both posts and now I get a list of No Picture available for each of my manufacturers.
I understand that the code needs to point to the right folder where my images are but what do I have to change in the code for that?
My images are in image/manufacturers/logo_name.gif
Could someone help please :cool: