Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

whats new box


Molteri

Recommended Posts

Hi

 

I need manufacturers name in whats new box. What is wrong with these codes?

 

fetching the information from table:

 

if ($random_product = tep_random_select("select p.products_id, p.products_image, m.manufacturers_id, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_MANUFACTURERS . " m where p.products_status

= '1' and p.manufacturers_id = m.manufacturers_id order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

?>

 

printing the information:

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO , 'products_id=' . $random_product['manufacturers_id']) . '">'. $random_product['manufacturers_name'] . '</a><br>

 

 

cant get it printing the manufacturers name.

 

Thanks.

 

Molteri

Link to comment
Share on other sites

You need to put manufacturers_name in the first part of the select statement.

I'm guess you can stick in a m.manufacturers_name right after the first manufacturers_id

 

Kelly

 

 

Hi

 

I need manufacturers name in whats new box. What is wrong with these codes?

 

fetching the information from table:

 

  if ($random_product = tep_random_select("select p.products_id, p.products_image, m.manufacturers_id, p.products_tax_class_id, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_MANUFACTURERS . " m where p.products_status

= '1' and p.manufacturers_id = m.manufacturers_id order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {

?>

 

printing the information:

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO , 'products_id=' . $random_product['manufacturers_id']) . '">'. $random_product['manufacturers_name'] . '</a><br>

cant get it printing the manufacturers name.

 

Thanks.

 

Molteri

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...