Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding manufacturer logo to product pages


Jet200

Recommended Posts

Posted

http://jet200.com/catalog/product_info.php?products_id=509

 

I want to add a manufacturer logo above the product description and be able to control if it appears or not. I see some control for this is admin but it seems to have been designed out of my page. Or not, feel free to poke around in the code and let me know if it just needs to be turned on or what line of code to add and where.

 

Any advice is greatly appreciated.

Posted

The code for which you are looking is probably in includes/boxes/manufacturer_info.php -- here's a slightly edited version that might have more info than you want:

	$manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p  where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id");
if (tep_db_num_rows($manufacturer_query)) {
  $manufacturer = tep_db_fetch_array($manufacturer_query);

  $manufacturer_info_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
  if (tep_not_null($manufacturer['manufacturers_image'])) $manufacturer_info_string .= '<tr><td align="center" class="infoBoxContents" colspan="2">' . tep_image(DIR_WS_IMAGES . $manufacturer['manufacturers_image'], $manufacturer['manufacturers_name']) . '</td></tr>';
  if (tep_not_null($manufacturer['manufacturers_url'])) $manufacturer_info_string .= '<tr><td valign="top" class="infoBoxContents">- </td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $manufacturer['manufacturers_id']) . '" target="_blank">' . sprintf(BOX_MANUFACTURER_INFO_HOMEPAGE, $manufacturer['manufacturers_name']) . '</a></td></tr>';
  $manufacturer_info_string .= '<tr><td valign="top" class="infoBoxContents">- </td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a></td></tr>' .
							   '</table>';
  echo $manufacturer_info_string;
}

Always back up before making changes.

  • 2 weeks later...
Posted

well i messed around with that code - stripped it down as much as i could but still end up with layout issues. i can get the logo to sit to the right of the product image but for some reason the product name, price, qty etc. now all move down below the product image. there should be plenty of room for all of that info.

 

i think something simple - i just need a logo to display, no links, etc.

 

any additional help is greatly appreciated. thanks!

Posted

You can try Manufacturer image and/or name on product_info

 

or I recommend

 

Manufacturers Box with Description

 

Thanx I forgot to add the last one to my site. :lol:

 

But I don't think you can say which one display or not, either all the products has a manufacturer's image or none...

"I have no special talent. I am only passionately curious"

- Albert Einstein

Archived

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

×
×
  • Create New...