Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Total Shipping Weight


Guest

Recommended Posts

Does anyone have any ideas how I can grab the total shipping weight in the admin area for a php script I am attempting to piece together to handle my shipping needs?

 

Is it stored anywhere?

 

thanks

Link to comment
Share on other sites

My problem is this, however, that some orders are manually put in and therefore dont use a shipping module on checkout... this figure needs to be generated on the admin side.

Link to comment
Share on other sites

ok, ive come up with the following so far:-

 

	$fetch_product = mysql_query("SELECT products_id,products_quantity FROM orders_products WHERE orders_id='$oID'");
$product = mysql_fetch_row($fetch_product);

$fetch_weight = mysql_query("SELECT products_weight FROM products WHERE products_id='$product[0]'");
$weight = mysql_fetch_row($fetch_weight);

$total_weight = ($weight[0] * $product[1]);

 

this will multiply a quantity by product, but what if there is more than 1 line of products... ie 2 of 1 item and 1 of another item. How can I have it fetch the second row of orders?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...