Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Displaying the manufacturer in product description


sjorty

Recommended Posts

Posted

I want my product_info.php page that displays the model name to allso display the name of the manufacturer.

 

Example!

 

Instead of showing:

 

Ipod Video

 

I want it show:

 

Apple Ipod Video

 

If you know what I mean.

Posted

backup files then in your catalog\product_info.php

 

locate this code:

	$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

replace with

	$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id=pd.products_id) left join " . TABLE_MANUFACTURERS . " m on (m.manufacturers_id=p.manufacturers_id) where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . (int)$languages_id . "'");

 

further down locate this code:

 

	if (tep_not_null($product_info['products_model'])) {
  $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
  $products_name = $product_info['products_name'];
}

 

Right below it add

$products_name = $product_info['manufacturers_name'] . ' ' . $products_name;

 

and try it

  • 1 year later...
Posted
backup files then in your catalog\product_info.php

 

locate this code:

	$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

replace with

	$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id=pd.products_id) left join " . TABLE_MANUFACTURERS . " m on (m.manufacturers_id=p.manufacturers_id) where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . (int)$languages_id . "'");

 

further down locate this code:

 

	if (tep_not_null($product_info['products_model'])) {
  $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
  $products_name = $product_info['products_name'];
}

 

Right below it add

$products_name = $product_info['manufacturers_name'] . ' ' . $products_name;

 

and try it

 

Great , but can you also ad the image-logo of the manufacturer....???

  • 7 months later...
Posted

Sorry I couldnt answer your previous question, but I have one that is similar:

I would like to do something close to what you are doing, but need the product name to be inserted inside the description. For example:

 

The <?php echo tep_get_products_name('$product_id'); ?> is just one of many  “soft-as-butter” 100% Faux Furs hand-picked

 

this doesn't work. im talking about using it inside the admin area in edit just to clarify...any suggestions?

Archived

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

×
×
  • Create New...