Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manufacturer name in email order notification


Tato

Recommended Posts

Add a function to retrieve the manufacture's name to /catalog/includes/general.php

 

////

// Return a product's manufacturer

// TABLES: manufacturer

 function tep_get_manufacturers_name($product_id) {



   $the_manufacturers_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi, " . TABLE_PRODUCTS . " p where p.products_id = '" . $product_id . "' and p.manufacturers_id = m.manufacturers_id and mi.manufacturers_id = m.manufacturers_id");

   $the_manufacturers = tep_db_fetch_array($the_manufacturers_query);



   return $the_manufacturers['manufacturers_name'];

 }

 

Now call that with <?php echo tep_get_manufacturers_name($the_products_id); ?>

 

Just replace $the_products_id with whatever you have that knows it at the time :D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...