Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manufacturers Name function call (MS-2)


Guest

Recommended Posts

Here's my problem: I am trying to put the Manufacturers name in various places where appropriate.

 

First Error: (from the product_info.php page)

 

Fatal error: Call to undefined function: tep_get_manufacturers_name() in /home/forks/www/catalog/product_info.php on line 93

 

Here is the function in general.php:

 

 

////
// Return a product's manufacturer
// TABLES: manufacturer
function tep_get_manufacturers_name($products_id) {
  $product_manufacturers_query = tep_db_query("select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'");
  $product_manufacturers = tep_db_fetch_array($product_manufacturers_query);
  $the_manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $product_manufacturers['manufacturers_id'] . "'");
  $the_manufacturers = tep_db_fetch_array($the_manufacturers_query);
  return $the_manufacturers['manufacturers_name'];
}

 

I cant figure out why I would get that error.

 

The second issue is in the Product listing page, I can use the variable in that page to pass the Manufacturer name into the product name TD cell, however, when I turn off the Manufacturer column, (because I want the manufacturers name in the Product name as opposed to it's own column) That variable becomes empty.

 

Any thoughts?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...