Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Weight in Product_info ????


Guest

Recommended Posts

how can i make it possible that the weight also displays in the Product Info ??? I found it doing it with the manufacturer but for weight there is no entry.

 

Hope someone can help ....

 

 

Thanx

 

Nox :roll: :roll:

Link to comment
Share on other sites

You can either add the field p.products_weight to this line:

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

 

Or add this function to general.php

////

// Return a product's weight

// TABLES: products

 function tep_get_products_weight($products_id) {

   $weight_query = tep_db_query("select products_weight from " . TABLE_PRODUCTS . " where products_id = '" . $products_id . "'");

   $weight_values = tep_db_fetch_array($weight_query);

   return $weight_values['products_weight'];

 }

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...