View Single Post
  #3  
Old 08-05-2008, 02:31 PM
 
lizlee00 lizlee00 is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 56
 

Default Re: ShippingKit for UPS Question

I wanted to post back here in case anyone was interested. I ended up coming up with a pretty simple solution. I just converted the notes field of the Orders table to a weight field.

First I changed the datatype to decimal in the database. I then modified the history_order.tpl and changed the field from textarea to text box and changed the label. Lastly, I modified the UPS_ship.php file under modules/UPS_Ship. Where it once said:
Code:
$total_weight = array_pop (func_query_first ("SELECT SUM(p.weight*od.amount) FROM $sql_tbl[order_details] od, $sql_tbl[products] p WHERE od.orderid='$orderid' AND od.productid=p.productid"));

I replaced it with:
Code:
$total_weight = func_query_first_cell("SELECT notes FROM $sql_tbl[orders] WHERE orderid='$orderid'");

This allows the order processor to open up the order and enter in the weight before generating the shipping label for the order.
__________________
-Liz
Version 4.1.8
www.partssystems.com
Reply With Quote