Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

weight in products_info.php under cost


Salvo

Recommended Posts

Posted

Hi all

 

I would like to know how to put the weight under/next the price or just anywhere in the products_info.php

 

I know that one can turn it on/off in listing, why isn't in the products_info?

 

Thanks

Posted

Hi..

Not too difficult.

Open productinfo.php and find and replace:

<?php

 $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, p.products_mediumimage, 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 = '" . $languages_id . "'");

 if (!tep_db_num_rows($product_info_query)) { // product not found in database

?>

with

<?php

 $product_info_query = tep_db_query("select p.products_id, p.products_weight, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_mediumimage, 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 = '" . $languages_id . "'");

 if (!tep_db_num_rows($product_info_query)) { // product not found in database

?>

Then find:

<td align="right" class="pageHeading"><?php echo $products_price; ?></td>

and replace with:

<td align="right" class="pageHeading"><?php echo $products_price; ?><br>Weight: <?php echo $product_info['products_weight']; ?> lbs.</td>

 

Or something to that effect.

Take care,

Marg

Posted

in admin side of store

admin/configuration/products listing and enable display product weight

 

HTH

The_Bear

Posted

Thanks Pierre,

 

I will try that tonight at home...

 

Salvo

 

PS: I am learning bit by bit

Archived

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

×
×
  • Create New...