Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

Have you tried using CNY as a currency code? Makes more sense although the documentation from UPS says otherwise. But that might have changed already...

 

 

Thanks Jan for your concern.

 

I have tried setting "UPS Currency Code"

(Enter the 3 letter currency code for your country of origin. United States (USD)) in Admin to CNY or USD, the result is the same, for example, one package ship to USA cost CNY1,000, then i get return quotation by UPS XML say $1,000, no matter i use USD or CNY as "UPS Currency Code".

 

UPS customers support representative said it can only return CNY quotation. but what i look forward is the quotation could change according to currency code selected, say our store have two difference currency USD and EUR, USD is the default currency, when USD was select, UPS XML quotation show USD700, if EUR was selected, show USD660.

 

I am wondering it can work when using the function of currency change, any better idea?

 

Best regards,

Link to comment
Share on other sites

Thanks Jan for your concern.

 

I have tried setting "UPS Currency Code"

(Enter the 3 letter currency code for your country of origin. United States (USD)) in Admin to CNY or USD, the result is the same, for example, one package ship to USA cost CNY1,000, then i get return quotation by UPS XML say $1,000, no matter i use USD or CNY as "UPS Currency Code".

 

UPS customers support representative said it can only return CNY quotation. but what i look forward is the quotation could change according to currency code selected, say our store have two difference currency USD and EUR, USD is the default currency, when USD was select, UPS XML quotation show USD700, if EUR was selected, show USD660.

 

I am wondering it can work when using the function of currency change, any better idea?

 

Best regards,

 

 

Just want to close my question.

 

I got part of solution from "http://www.oscommerce.com/forums/index.php?showtopic=175801".

 

THANHS Janz!

Link to comment
Share on other sites

I'm getting an error when a user tries to check out, and its not getting the rates :(

 

Error from cURL: Error [77]: error setting certificate verify locations:

CAfile: /etc/ssl/certs/ca-certificates.crt

CApath: none

 

I followed http://unix.stadia.fi/~pkoistin/postfix/po...ls-cacert.shtml to make a crt (putting the crt in the folder listed above with same name)

 

and now I get: Error from cURL: Error [60]: SSL certificate problem, verify that the CA cert is OK. Details:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

 

Suggestions? I know almost nothing about ssl certs which certainly doesnt help :P

Edited by SkyyPunk
Link to comment
Share on other sites

I'm getting an error when a user tries to check out, and its not getting the rates :(

 

Error from cURL: Error [77]: error setting certificate verify locations:

CAfile: /etc/ssl/certs/ca-certificates.crt

CApath: none

Never mind about changing anything on SSL's. Just comment out the lines that make cURL check the certificate. I'm pretty sure there is mention of it in the install directions. Otherwise check the source of the shipping module ups.php. There is a comment about which section to comment out in case of certicate verify location errors somewhere (like 80% down).

Link to comment
Share on other sites

I've just finished installing the UPSXML module. It seems to work, and provides the rates for the services selected. I'm still in test mode. However, it seems that when the request for the rate goes out to UPS, XML code reflects 4 lbs for weight. Yet if I look in the admin database for that product it shows 1 lbs.

Has anyone seen this behavior, or knows where is this X4 weight factor comes from ?

Link to comment
Share on other sites

I seem to have installed UPSXML v1.3.5 flawlessly. I am not getting a quote, and I am also not getting an error message...

 

Screenshot

upsxmlerrorla4.jpg

 

I read about the error log feature, but I am testing on a Windows machine. How do I enable the error log using a Windows path instead of a Unix path?

 

I don't believe I messed up anywhere in the installation.

Link to comment
Share on other sites

I figured out how to use the error log. How do I fix the following error?

 

Error from cURL: Error [60]: SSL certificate problem, verify that the CA cert is OK. Details:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

UPS RESPONSE:

 

curlgw7.jpg

Edited by dark_tyrant
Link to comment
Share on other sites

How do I prevent error 60 without uncommenting the following code?

 

//curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

Move those certificates to a directory cURL is looking for I guess. Unless you are the admin of that server I wouldn't bother looking into that.

What does the "Ready to ship" checkbox do?

Read the file "dimensions.txt" that is in the package. That explains what is meant with a "ready-to-ship" product.

Link to comment
Share on other sites

Move those certificates to a directory cURL is looking for I guess. Unless you are the admin of that server I wouldn't bother looking into that.

 

Read the file "dimensions.txt" that is in the package. That explains what is meant with a "ready-to-ship" product.

 

Thanks for the information. Are there any good tutorials about cURL for Windows on this site?

Link to comment
Share on other sites

I can not find any reference to "TEXT_DISPLAY_NUMBER_OF_SHIPMENTS" in any of the language files. It is being used in catalog/admin/ups_boxes_used.php and I do not know what it should say.

Good catch. I couldn't find it either. Found out that I added it to english.php in the test shop I used for this. No wonder it worked fine for me :)

 

define('TEXT_DISPLAY_NUMBER_OF_SHIPMENTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> shipments)');

Link to comment
Share on other sites

Good catch. I couldn't find it either. Found out that I added it to english.php in the test shop I used for this. No wonder it worked fine for me :)

 

define('TEXT_DISPLAY_NUMBER_OF_SHIPMENTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> shipments)');

 

Thank you for the fix. I am thinking this code should be added to catalog/admin/includes/languages/english/ups_boxes_used.php in the contributions so others won't have this problem.

 

Not on this site, but there is an official one for cURL.

 

I will check that out.

Edited by dark_tyrant
Link to comment
Share on other sites

Not sure if i'm in the right thread or not, kinda been rushing so please don't be mad at me lol also couldn't find anything related to monetary value anywhere

 

Anyhow, at work all of a sudden the UPSXML module stopped including insurance. I'm not sure if one of the other guys were working on something that broke it or not, as far as I can tell, the only change to the module's original code is the cURL fix. Following through the code and logs, monetary value appears to be submitted as 0 when insurance is on, and 100 when off, i realize the 100 is hard coded.

 

Following up the ladder i find the line

$this->pkgvalue = ceil($order->info['subtotal']); // is divided by number of boxes later

 

When i switch it to

$this->pkgvalue = ceil($order->info['total']); // is divided by number of boxes later

 

the logs show the proper rounded value being sent to UPS, and we're receiving a more value dependant shipping cost. I'm guessing some modifications done to osC are rendering the subtotal to not be calculated properly, but i don't know enough about osC nor even PHP for that matter to figure it out. I'm more used to the nuke style CMS' with a dedicated globals file.

any ideas?

Edited by Maedondias
Link to comment
Share on other sites

Where is the contribution link to this module? I can't seem to find it anywhere.

 

Joe

 

 

 

I have just released my own version of the UPS XML Rates and Services Shipping Module. I wanted to release it early to get feedback and bug reports. I dare say I have not tested it on any system but my own, so please consider it very beta.

 

I plan on improving this by extending it to support the more obscure features of the UPS XML gateway, and introduce intelligent product packing for anyone who has installed Tom Croix's Canada Post 3.1 module with dimensional support.

 

Enjoy.

 

 

Torin...

Link to comment
Share on other sites

Not sure if i'm in the right thread or not, kinda been rushing so please don't be mad at me lol also couldn't find anything related to monetary value anywhere

 

Anyhow, at work all of a sudden the UPSXML module stopped including insurance. I'm not sure if one of the other guys were working on something that broke it or not, as far as I can tell, the only change to the module's original code is the cURL fix. Following through the code and logs, monetary value appears to be submitted as 0 when insurance is on, and 100 when off, i realize the 100 is hard coded.

 

Following up the ladder i find the line

$this->pkgvalue = ceil($order->info['subtotal']); // is divided by number of boxes later

 

When i switch it to

$this->pkgvalue = ceil($order->info['total']); // is divided by number of boxes later

 

the logs show the proper rounded value being sent to UPS, and we're receiving a more value dependant shipping cost. I'm guessing some modifications done to osC are rendering the subtotal to not be calculated properly, but i don't know enough about osC nor even PHP for that matter to figure it out. I'm more used to the nuke style CMS' with a dedicated globals file.

any ideas?

That's a weird error. You can of course find out what is in the object $order when you echo it for example in the footer.

echo '<!-- '; // start html comment so your customers don't see this
print_r($order);
echo ' -->';

If you look at the class order you will find that if the order_id is not set yet it will invoke the function cart() which includes subtotal but not total until subtotal is calculated (at the bottom of the file). Total is including shipping_cost which is not set yet in checkout_shipping.php

Link to comment
Share on other sites

That's a weird error. You can of course find out what is in the object $order when you echo it for example in the footer.

stdClass Object
(
   [delivery] => Array
       (
           [postcode] => 10001
           [country] => Array
               (
                   [id] => 223
                   [title] => United States
                   [iso_code_2] => US
                   [iso_code_3] => USA
               )

           [country_id] => 223
           [zone_id] => 
           [format_id] => 2
       )

   [info] => Array
       (
           [total] => 3527.91
           [currency] => USD
           [currency_value] => 1.00000000
           [subtotal] => 3489.86
           [shipping_method] => United Parcel Service (UPS Ground)
           [shipping_cost] => 38.05
           [tax] => 0
           [tax_groups] => Array
               (
                   [unknown tax rate] => 0
               )

       )

)

 

I have pkgvalue set as subtotal right now. and this subtotal is correct, but i can't seem to pull it for some reason.

Link to comment
Share on other sites

I have pkgvalue set as subtotal right now. and this subtotal is correct, but i can't seem to pull it for some reason.

Are you sure this a valid address? If I remember correctly there should be a zone_id ("1" for Alabama, "2" for Alaska etcetera). You can't test the UPS system with bogus addresses...

Link to comment
Share on other sites

Are you sure this a valid address? If I remember correctly there should be a zone_id ("1" for Alabama, "2" for Alaska etcetera). You can't test the UPS system with bogus addresses...

 

I'm pretty sure it's a valid address, i'm getting a shipping quote, this worked about a month ago, and the only change on the module is the cURL fix... i don't know anything about the zone_id's, dont even recall seeing them anywhere. Though now i'm looking and seeing if i can stumble on anything more for myself

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...