X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   ShippingKit for UPS Question (https://forum.x-cart.com/showthread.php?t=41182)

lizlee00 07-17-2008 02:54 PM

ShippingKit for UPS Question
 
Hi,
I purchased ShippingKit for UPS a few months back. I haven't been able to work on my store as of late, but am now getting back to it. I've noticed that ShippingKit does not work with products that have product variants. I get a message back from UPS saying:
Code: UPS: 120608
Origin: UPSServiceResponse::UPSServiceResponse
Severity: Hard
Description: Package weight is required

Even thought I have entered a weight for each product variant.

Additionally, I would like to have the option to enter in the actual weight (as opposed to the estimated weight of the product) of the item before printing the UPS label. Has anyone overcome these issues?

balinor 07-17-2008 04:59 PM

Re: ShippingKit for UPS Question
 
Moving to Third Party Add-Ons

lizlee00 08-05-2008 02:31 PM

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.


All times are GMT -8. The time now is 02:28 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.