skeedo Posted May 8, 2003 Posted May 8, 2003 I'm really close, I think! function tep_get_manufacturer_name($cPath) { $manufacturer_query = tep_db_query("SELECT manufacturers_name FROM " . TABLE_MANUFACTURERS . " WHERE manufacturers_id = '" . $cPath . "'"); $products_manufacturer = tep_db_fetch_array($manufacturer_query); return ($products_manufacturer['manufacturers_name'] == "" ? "N/A" : $products_manufacturer['manufacturers_name']); } Put <?php echo tep_get_manufacturers_name($cPath); ?> in manufacturer_info.php and it displayed a manufacturer, just not the right one.
Ajeh Posted May 8, 2003 Posted May 8, 2003 $cPath is the category path. Don't you really want to test for the $products_id? Then call it with the current products products_id
skeedo Posted May 8, 2003 Author Posted May 8, 2003 Lol......I'm such a noob. :roll: I'll give it a try, thanks Linda.
skeedo Posted May 14, 2003 Author Posted May 14, 2003 Ooh man I'm so close this is what I have: function tep_get_manufacturer_name($products_id) { $manufacturer_query = tep_db_query("SELECT manufacturers_name FROM " . TABLE_MANUFACTURERS . " WHERE manufacturers_id = '" . $products_id . "'"); $products_manufacturer = tep_db_fetch_array($manufacturer_query); return ($products_manufacturer['manufacturers_name'] == "" ? "N/A" : $products_manufacturer['manufacturers_name']); } When I echo it out with $products_id it just returns N/A.....
Recommended Posts
Archived
This topic is now archived and is closed to further replies.