Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to display manufacturer in product info?


Blizna

Recommended Posts

Hello,

Im looking for way how to display manufacturer in item detail (product_info.php) . I tried Display manufacturer in admin settings but it only shows it in category items overview, not in item itself.

Thanks!

Link to comment
Share on other sites

In product info.php you will need this to get the manu name displayed before the product description.

 

<?php

} else {

$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,

" . TABLE_PRODUCTS_DESCRIPTION . " pd ,

" . TABLE_MANUFACTURERS . " m

where

p.manufacturers_id = m.manufacturers_id and

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 . "'");

$product_info = tep_db_fetch_array($product_info_query);

 

tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

 

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

} else {

$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

}

 

if (tep_not_null($product_info['products_model'])) {

$products_name = $product_info['manufacturers_name']." ".$product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';

} else {

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

}

?>

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...