Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display Manufacturer Image in product_listing.php


sakkiotto

Recommended Posts

HI,

it's possible show logo manufactures (already all manufactures have logo) and not the name of the manufactures in product_listing.php ?

 

i try to modify function on general.php ?

change name with image???

 

function tep_get_manufacturers($manufacturers_array = '') {
   if (!is_array($manufacturers_array)) $manufacturers_array = array();
   $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
   while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
  $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
   }
   return $manufacturers_array;
 }

Link to comment
Share on other sites

No simple way. The most obvious method would be to change the $listing_sql definition in the calling pages (e.g. index.php) and the display code in includes/modules/product_listing.php

 

The tep_get_manufacturers function won't help you with the product listing page, as that page uses its own SQL query to get the manufacturer info (and all the other info in each listing). You could hack up a new function that would load the image based on the ID, but that seems wasteful since you are already accessing the relevant table to get the name.

Always back up before making changes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...