Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manufacturers LOGO on product listing page


iamrwood

Recommended Posts

Posted

I am just getting started with osCommerce and I need to be able to display the manufacturer's LOGO (for the manufacturer's whose logos are available) on the individual product pages.

 

I have logged into the admin area and gone to Catalog>Manufacturers and updated just ONE of the manufacturer's info with a logo (the rest have names, but no logos)

 

I have then gone to Configuration>Product Listing and the only option available for me to turn on is: "Display Product Manufacturer Name"

 

I have googled and searched this forum for some sort of add on or change to the product_info.php file that will make this happen, but to no avail. I did find a few things that I thought MIGHT work. They did not.

 

Really really really appreciate any help, or redirection if you have seen a solution to this else where!

 

Thanks

Ms. RWood

Posted

You can place this wherever you see fit to display in your product_info.php file.

 

<?php
   $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)$_GET['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 //-->
<?php
  if (tep_not_null($manufacturer['manufacturers_image'])) $manufacturer_info_string .= '<a title="' . $product_info['products_name'] . ' by ' . $manufacturer['manufacturers_name'] . '" href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer['manufacturers_id']) . '">' . tep_image(DIR_WS_IMAGES . $manufacturer['manufacturers_image'], $product_info['products_name'] . ' by ' . $manufacturer['manufacturers_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

  echo $manufacturer_info_string;
   }
?>
<!-- eof_manufacturer_info //-->

 

The code after <!-- manufacturer_info //--> can be modified to fit your layout, its something I had already on a clients site.

Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Posted

Thanks WebSource5!!! Worked like a charm, appreciate your help!

 

RWood

  • 3 months later...
Posted

Hello @

 

This explains how to add the manufacturer image to product_info but is there a way to add it to product_listing, I want to show the logo on the manufacturers page. I cant seem to find a solution anywhere on the forum.

 

Thanks for any help

Claire

Archived

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

×
×
  • Create New...