zlack Posted May 22, 2003 Posted May 22, 2003 Mattreicher pm'd me how to display the manufacturer and i though some ppl might find it usefull. // Products manufacturer function tep_get_products_manufacturer($product_id) { $products_manufacturer_query = tep_db_query("SELECT manufacturers_id FROM " . TABLE_PRODUCTS . " WHERE products_id = '" . $product_id . "'"); $products_manufacturer = tep_db_fetch_array($products_manufacturer_query); $manufacturer_query = tep_db_query("SELECT manufacturers_name FROM " . TABLE_MANUFACTURERS . " WHERE manufacturers_id = '" . $products_manufacturer['manufacturers_id'] . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); return ($manufacturer['manufacturers_name'] == "" ? "N/A" : $manufacturer['manufacturers_name']); } Then you can call it with: <?php echo tep_get_products_manufacturer($products_id); ?> It's easier to remember, then to forget
arbocenc Posted May 31, 2003 Posted May 31, 2003 I wonder how can I list the manufacturer name in the orders. Is this way the best way? Or is there any easier way? Thanks, arbocenc [email protected] www.delaterra.net organic food in Catalonia
Recommended Posts
Archived
This topic is now archived and is closed to further replies.