Jan Zonjee Posted September 18, 2007 Share Posted September 18, 2007 With that cheat I'm getting the EDD for international shipments and the <MonetaryValue>100</MonetaryValue>. However, if I change the product quantity to 4 x $30.50 = $122.00, the <MonetaryValue> is still 100. Does it mean that doesn't matter what the actual value of the package, the insured is just $100? Looks like something is different or wrong with your osC. If I change this in checkout_shipping.php: <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); echo '<!-- '; echo '<pre>Order object: <br />'; print_r($order); echo '</pre> -->'; ?> <!-- footer_eof //--> It prints out (just top part shown, not visible to customer directly because it is between html comment tags, do view source to see it): <!-- <pre>Order object: <br />order Object ( [info] => Array ( [order_status] => 1 [currency] => USD [currency_value] => 1.00000000 [payment_method] => [cc_type] => [cc_owner] => [cc_number] => [cc_expires] => [shipping_method] => [shipping_cost] => [subtotal] => 19.87 [tax] => 0.7948 [tax_groups] => Array As you see the $order->info['subtotal'] is 19.87. It being zero is not normal. And, also the rates are almost doubled because of the incorrect weight, 4 LBS instead of 1.8 LBS. Is there any workaround to get the accurate UPS rates based on the actual package weight? The upsxml module sends the correct weight to UPS. I'm not familiar with their rates to be able to tell you why they use a double weight for calculating the rate. Ask them please. Quote Link to comment Share on other sites More sharing options...
Irin Posted September 18, 2007 Share Posted September 18, 2007 (edited) Looks like something is different or wrong with your osC. If I change this in checkout_shipping.php: <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); echo '<!-- '; echo '<pre>Order object: <br />'; print_r($order); echo '</pre> -->'; ?> <!-- footer_eof //--> It prints out (just top part shown, not visible to customer directly because it is between html comment tags, do view source to see it): <!-- <pre>Order object: <br />order Object ( [info] => Array ( [order_status] => 1 [currency] => USD [currency_value] => 1.00000000 [payment_method] => [cc_type] => [cc_owner] => [cc_number] => [cc_expires] => [shipping_method] => [shipping_cost] => [subtotal] => 19.87 [tax] => 0.7948 [tax_groups] => Array As you see the $order->info['subtotal'] is 19.87. It being zero is not normal. The upsxml module sends the correct weight to UPS. I'm not familiar with their rates to be able to tell you why they use a double weight for calculating the rate. Ask them please. In checkout_shipping.php the $order->info['subtotal'] is not zero. Here is what I get: <!-- <pre>Order object: <br />order Object ( [info] => Array ( [order_status] => 1 [currency] => USD [currency_value] => 1.00000000 [payment_method] => [cc_type] => [cc_owner] => [cc_number] => [cc_expires] => [purchase_order_number] => [customer_credit_left] => [customer_credit_amount] => [shipping_method] => [shipping_cost] => [subtotal] => 30.5 [tax] => 0 [tax_groups] => Array In the upsxml.log <MonetaryValue>31</MonetaryValue>. Now I get it... I used the "Ship In cart" to calculate shipping rates in shopping cart and there the product value is lost somewhere. Once I logged in and actually went to checkout_shipping.php, it seems to be working ok, except the <BillingWeight> is always 4.0. The rates are doubled only if Dimensional support is enabled. Once I disable it, the rates from UPS are returned ok and <Weight>1.0</Weight>. Edited September 18, 2007 by Irin Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 18, 2007 Share Posted September 18, 2007 except the <BillingWeight> is always 4.0. That is what UPS uses for their rates, it might be some minimum value. Really don't know. I guess UPS would know the answer to that (or check through their website what the rates are for 1, 2, 3, 4 lbs?). Quote Link to comment Share on other sites More sharing options...
Irin Posted September 18, 2007 Share Posted September 18, 2007 That is what UPS uses for their rates, it might be some minimum value. Really don't know. I guess UPS would know the answer to that (or check through their website what the rates are for 1, 2, 3, 4 lbs?). Ok, but the problem is only with Dimensional support enabled, <BillingWeight> is 4.0 Once I disable it, the rates from UPS are returned ok and <Weight>1.0</Weight>. Isn't it strange? Quote Link to comment Share on other sites More sharing options...
kustomjs Posted September 19, 2007 Share Posted September 19, 2007 I get this error message: Error from cURL: Error [28]: SSL connection timeout experienced by customer with id 3 on 2007-09-19 07:55:05 UPSXML Rates Error: Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway : Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway this was sent to my email from my web server. Quote Link to comment Share on other sites More sharing options...
kustomjs Posted September 19, 2007 Share Posted September 19, 2007 Nevermind I finally got it fix. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 19, 2007 Share Posted September 19, 2007 Ok, but the problem is only with Dimensional support enabled, <BillingWeight> is 4.0 Once I disable it, the rates from UPS are returned ok and <Weight>1.0</Weight>. Isn't it strange? No, it is not strange. It is exactly the reason why UPSXML can be useful because we are dealing with dimensional weight here. From the UPS website I learned that for international shipments from the US you have to use whatever is the highest: dimensional weight or actual weight. The dimensional weight for international shipments is L x W x H (in inches) divided by 166. 12 x 9 x 6 = 648, divided by 166 is 3.9. Any fraction is rounded up so the billable weight is 4 lbs. If you didn't use dimensional support and shipped in that box you would have lost on the shipping charges. Quote Link to comment Share on other sites More sharing options...
Irin Posted September 19, 2007 Share Posted September 19, 2007 No, it is not strange. It is exactly the reason why UPSXML can be useful because we are dealing with dimensional weight here. From the UPS website I learned that for international shipments from the US you have to use whatever is the highest: dimensional weight or actual weight. The dimensional weight for international shipments is L x W x H (in inches) divided by 166. 12 x 9 x 6 = 648, divided by 166 is 3.9. Any fraction is rounded up so the billable weight is 4 lbs. If you didn't use dimensional support and shipped in that box you would have lost on the shipping charges. Yes Jan, you're right. Now I can see that. Just one question, if I have a package with actual LxWxH 8x6x3, should I enter the dimensions as Length: 8, Width: 6, Height: 3? I really don't know why I have it set as 12x9x6 right now. That's why if I ship a product in that package and print a packing label from UPS web site, I'm being charged just half of the price I actually charge the customer. That preformatted packaging data from the contribution probably got me confused. It's not very clear. Thanks a lot for all your help. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 19, 2007 Share Posted September 19, 2007 Yes Jan, you're right. Now I can see that. Just one question, if I have a package with actual LxWxH 8x6x3, should I enter the dimensions as Length: 8, Width: 6, Height: 3? I really don't know why I have it set as 12x9x6 right now. That's why if I ship a product in that package and print a packing label from UPS web site, I'm being charged just half of the price I actually charge the customer. That preformatted packaging data from the contribution probably got me confused. It's not very clear. You should delete all the boxes in admin/packaging.php that you are not using and make sure that dimensions and weight of the remaining ones are accurate. It is not good to have packages/boxes in there that you don't have. Quote Link to comment Share on other sites More sharing options...
Irin Posted September 19, 2007 Share Posted September 19, 2007 You should delete all the boxes in admin/packaging.php that you are not using and make sure that dimensions and weight of the remaining ones are accurate. It is not good to have packages/boxes in there that you don't have. I got there just the boxes that I really use for shipping my products with the exact dimensions and weight. And, according to the tests I ran, it's giving me the accurate rates from UPS. I want to thank you, Jan, for all your help and clarifications. Quote Link to comment Share on other sites More sharing options...
telavir Posted September 20, 2007 Share Posted September 20, 2007 (edited) I've installed it, configured it, it links with UPS, and it all seems to work fine. Then I tested it. I tested a destination in colorado and one in Las Vegas. It gave me $3 - Ground, $12 - 3 Day Select & $13 - Next Day Saver for both entries. On my UPS machine it was $5.60 and $4.70 for a 1lb package. What do I need to do? Update - I received an error from UPS that states: UPSXML Rates Error: 110206: Missing/Illegal ShipTo/Address/StateProvinceCode experienced by customer with id 129 on 2007-09-20 11:36:59 Edited September 20, 2007 by telavir Quote End of line. Link to comment Share on other sites More sharing options...
fineesmendez Posted September 21, 2007 Share Posted September 21, 2007 Hi, I installed the latest version of this module and I get a weird error. It seems that for every product 6 pounds is being added to the total net weight. For example, one of the products weights apprx. 1 pound and the module shows 7 pounds; and products with 0 or no weight, a default 6 pounds is added to the total net weight. Any ideas? Has this happened to any one else before? We contacted UPS, who informed us the scripts provide estimates based on what queries get delivered to their servers. Which makes sense, since the 6 pounds are added to the net weight already included in the database. Your help is much appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 21, 2007 Share Posted September 21, 2007 What do I need to do? Not tick the box that you have discounted prices from UPS where you don't have that. Update - I received an error from UPS that states:UPSXML Rates Error: 110206: Missing/Illegal ShipTo/Address/StateProvinceCode experienced by customer with id 129 on 2007-09-20 11:36:59 Little to add to that isn't there. Go look in your admin what that customer has for an address... Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 21, 2007 Share Posted September 21, 2007 It seems that for every product 6 pounds is being added to the total net weight. See the Knowledge base on how osC calculates shipping weight. Quote Link to comment Share on other sites More sharing options...
telavir Posted September 21, 2007 Share Posted September 21, 2007 Not tick the box that you have discounted prices from UPS where you don't have that. I'm not sure what you mean. We get discounts from UPS on our rates. Little to add to that isn't there. Go look in your admin what that customer has for an address... I think it has something to do with the fact that the state is spelled out. This question probably belongs in another section, but is there some setting somewhere to change it to a standard drop down for US states? Quote End of line. Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 21, 2007 Share Posted September 21, 2007 I'm not sure what you mean. We get discounts from UPS on our rates. Then the UPS server is not giving you any discounted rates (yet?). The numbers that are returned are the numbers that UPS uses for the services (see includes/languages/english/modules/shipping/upsxml.php). For example: define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_03', 'UPS Ground'); I think it has something to do with the fact that the state is spelled out. This question probably belongs in another section, but is there some setting somewhere to change it to a standard drop down for US states? It is already a drop-down when you open an account or am I mistaken with a contribution I added? Anyway, the state abbreviation is dealt with by UPSXML itself (around line 215): function quote($method = '') { global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes, $total_weight, $boxcount, $cart; // UPS purports that if the origin is left out, it defaults to the account's location. Yeah, right. $state = $order->delivery['state']; $zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_name = '" . $order->delivery['state'] . "'"); if (tep_db_num_rows($zone_query)) { $zone = tep_db_fetch_array($zone_query); $state = $zone['zone_code']; } Quote Link to comment Share on other sites More sharing options...
telavir Posted September 21, 2007 Share Posted September 21, 2007 Then the UPS server is not giving you any discounted rates (yet?). The numbers that are returned are the numbers that UPS uses for the services (see includes/languages/english/modules/shipping/upsxml.php). For example: define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_03', 'UPS Ground'); It might be "yet." I'll have to check into that. It is already a drop-down when you open an account or am I mistaken with a contribution I added? Anyway, the state abbreviation is dealt with by UPSXML itself (around line 215): function quote($method = '') { global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes, $total_weight, $boxcount, $cart; // UPS purports that if the origin is left out, it defaults to the account's location. Yeah, right. $state = $order->delivery['state']; $zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_name = '" . $order->delivery['state'] . "'"); if (tep_db_num_rows($zone_query)) { $zone = tep_db_fetch_array($zone_query); $state = $zone['zone_code']; } I am using OSC 2.2 Milestone 2. Was that changed since then? When the customer enters their State it is a text box (no dropdown). I tested it by spelling it out and received the error. Quote End of line. Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2007 Share Posted September 22, 2007 Does anyone know of a way to print out a UPS shipping label straight from the admin section? Perhaps a contribution that's out there or something I could tweak in the existing UPS XML shipping module? Or is there another way people have handled this? Essentially they just don't want to type in all the information again on the UPS web site or their label printer, since it is already in the OSCommerce DB. I can understand, but just not sure if that is possible. It seems likely this has come up with other people using this module. Thanks! Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 22, 2007 Share Posted September 22, 2007 I am using OSC 2.2 Milestone 2. Was that changed since then? When the customer enters their State it is a text box (no dropdown). I tested it by spelling it out and received the error. I think the default behaviour was that you choose the country and then when you submit the page is shown again with a drop-down for the states. There are at least two contributions that deal with it. State list dropdown and US default country and Country-State Selector. I think I've used the latter one, but I don't know if there are directions in it for making US the default country and showing the drop-down in the first "pass". So perhaps you're better off taking the best out of the two. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 22, 2007 Share Posted September 22, 2007 Does anyone know of a way to print out a UPS shipping label straight from the admin section? Perhaps a contribution that's out there or something I could tweak in the existing UPS XML shipping module? Or is there another way people have handled this? Essentially they just don't want to type in all the information again on the UPS web site or their label printer, since it is already in the OSCommerce DB. I can understand, but just not sure if that is possible. It seems likely this has come up with other people using this module. As far as I know there is only something like that for the UPS software. Searching on the add-ons website using "worldship" as keyword showed two, UPS Worldship Integration is the latest. I don't see how this can be integrated with the UPS website, but I never use it so I might be very wrong. Quote Link to comment Share on other sites More sharing options...
beachkitty85 Posted September 23, 2007 Share Posted September 23, 2007 I installed this module several months ago and I added the GoDaddy fix as suggested. This module works perfectly most of the time, but every now and again I get the following in the error log: UPSXML TimeInTransit Error: 270019: TimeInTransit system not available experienced by customer with id 152 on 2007-09-22 22:01:59 When I go to test things out, sometimes I am able to checkout with no problem (when logged in as the customer in question with the same items in my cart) and sometimes the checkout_shipping.php page never loads, causing the error above. I've searched and can't find anyone having a similar problem. Any suggestions? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 23, 2007 Share Posted September 23, 2007 every now and again I get the following in the error log: UPSXML TimeInTransit Error: 270019: TimeInTransit system not available experienced by customer with id 152 on 2007-09-22 22:01:59 When I go to test things out, sometimes I am able to checkout with no problem (when logged in as the customer in question with the same items in my cart) and sometimes the checkout_shipping.php page never loads, causing the error above. I've searched and can't find anyone having a similar problem. Any suggestions? Strange. I forced the error 270013: Invalid Shipment Contents Value by making a product a zero price and making sure insurance was set to true and it logged the error and showed a strange checkout page because of the ( , ) after the service but it didn't make the page not load. I could avoid the strange layout by some small changes in upsxml.php: Around line 327-332: // debug only: /* echo '<pre>Packages and variables:<br />'; print_r($this); echo '<br />'; exit; */ $this->servicesTimeintransit = $this->_upsGetTimeServices(); To: /* echo '<pre>Packages and variables:<br />'; print_r($this); echo '<br />'; exit; */ $_upsGetTimeServicesResult = $this->_upsGetTimeServices(); if ($_upsGetTimeServicesResult != false && is_array($_upsGetTimeServicesResult)) { // $this->servicesTimeintransit = $this->_upsGetTimeServices(); $this->servicesTimeintransit = $_upsGetTimeServicesResult; } and around line 1132 (close to the end, in the function _transitparseResult($xmlTransitResult): return $errorMsg; to: return false; I don't know if error 270019 comes with a ResponseStatusCode of 1 but I can't imagine it. If it comes with ResponseStatusCode 0 the TimeInTransit stuff should fail silently with the above code. Without disrupting the checkout. Quote Link to comment Share on other sites More sharing options...
cybercomputing Posted September 23, 2007 Share Posted September 23, 2007 Tried to look through the thread but couldn't find it. Just installed it (correctly i hope) and i'm receiving this ... 10002: The XML document is well formed but the document is not valid Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
beachkitty85 Posted September 24, 2007 Share Posted September 24, 2007 Strange. I forced the error 270013: Invalid Shipment Contents Value by making a product a zero price and making sure insurance was set to true and it logged the error and showed a strange checkout page because of the ( , ) after the service but it didn't make the page not load. I could avoid the strange layout by some small changes in upsxml.php: Around line 327-332: // debug only: /* echo '<pre>Packages and variables:<br />'; print_r($this); echo '<br />'; exit; */ $this->servicesTimeintransit = $this->_upsGetTimeServices(); To: /* echo '<pre>Packages and variables:<br />'; print_r($this); echo '<br />'; exit; */ $_upsGetTimeServicesResult = $this->_upsGetTimeServices(); if ($_upsGetTimeServicesResult != false && is_array($_upsGetTimeServicesResult)) { // $this->servicesTimeintransit = $this->_upsGetTimeServices(); $this->servicesTimeintransit = $_upsGetTimeServicesResult; } and around line 1132 (close to the end, in the function _transitparseResult($xmlTransitResult): return $errorMsg; to: return false; I don't know if error 270019 comes with a ResponseStatusCode of 1 but I can't imagine it. If it comes with ResponseStatusCode 0 the TimeInTransit stuff should fail silently with the above code. Without disrupting the checkout. I made these changes, uninstalled the module, re-installed it, and the checkout shipping page seems to work fine now. I'll update you if something goes haywire. Thanks so much for your help! Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted September 24, 2007 Share Posted September 24, 2007 Tried to look through the thread but couldn't find it. Just installed it (correctly i hope) and i'm receiving this ... 10002: The XML document is well formed but the document is not valid Probably something with your shipping address. There is a setting in the admin, configuration I think of the shipper's address. You can check that also by logging (see the upsxml.php file itself for pointers on how to do that, use a full path) and see what you send to UPS. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.