Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

manufacture image versus drop down box


Guest

Recommended Posts

Posted

ive searched the forum and no luck, i want to have the images for my manufactures listed under the manufactures versus having the drop down menu. anyone have any luck with this?

Posted

Try this...

In includes/boxes/manufacturers.php change

  $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

to

  $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name, manufacturers_image from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

Change

      $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';

to

      $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . tep_image($manufacturers['manufacturers_image']) . '</a><br>';

I hope this helps.

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

anyone else have any input on this matter?

Posted

My apologies.

The second change should be to

      $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image']) . '</a><br>';

(I missed out the DIR_WS_IMAGES)

 

This can be seen working (at least until monday) at http://[email protected]

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

nope still doesnt work. i even got a new copy of manufactures and tried it fresh and still no luck.

Posted

i see it works on your site, but it doesnt work on mine.

  • 2 weeks later...
Posted
My apologies.

The second change should be to

      $manufacturers_list .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . tep_image(DIR_WS_IMAGES . $manufacturers['manufacturers_image']) . '</a><br>';

(I missed out the DIR_WS_IMAGES)

 

This can be seen working (at least until monday) athttp://[email protected]

 

is there any other changes because i still havent gotten it to work.

Posted

Is it possible to be a bit more informative, instead of just saying "it doesn't work!"?

Like:

  • What does it do when it doesn't work?

[*]If it is still displaying the drop-down, have you done the obvious thing in Admin and set the Manufacturers List value (in Admin / Configuration / Maximum Values) to a value greater than the number of manufacturers in your catalog?

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

ok thanks, i didnt change the maximum value. shouldnt have been so blunt. now i wnder how to align the images in the center of the box???

Posted

In includes/boxes/manufacturers.php

 

change

$info_box_contents[] = array('text' => substr($manufacturers_list, 0, -4));

to

$info_box_contents[] = array('align' => 'center',

                            'text' => substr($manufacturers_list, 0, -4));

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

great.. thanks, everythgin works. my next question is why do the manufactures images have spaces between them? some do and some dont.

 

http://www.qeiracing.com/default.php

 

when you look at the link you will see what i mean. the first image has a space under it before it gets to the next two, they have a space in between the next image.

 

thanks for all the help.

Posted

Do a View Source and look at your generated HTML. You'll notice that wherever you have a blank space its because you have one or more links to manufacturers where the image is missing.

For example, from the top down,

  • manfacturer ID 21 - image

[*]manfacturer ID 26 - no image

[*]manfacturer ID 19 - image

[*]manfacturer ID 18 - image

[*]manfacturer ID 10 - no image

[*]manfacturer ID 31 - no image

[*]manfacturer ID 16 - image

[*]manfacturer ID 14 - no image

[*]manfacturer ID 13 - no image

[*]manfacturer ID 29 - no image

[*]manfacturer ID 17 - image ...... etc, etc

Check your images!

Regards, Wizzud

"It is better to remain silent and be thought a fool, than to open your mouth and remove all doubt."

Posted

thanks for all your help. you can see it in action here...

 

 

www.qeiracing.com

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...