UPSrest v1.4.0. zen cart 2.1.0
Not sure if anyone reported it before. I can get a valid UPS quote in the checkout page (OPC). But I cannot get a shipping quote in "Estimated Shipping" in the shopping cart page. I have entered the state and zipcode. In the past / previous API, it could display a UPS rate. Now it only shows "UPS (image for) UPS No shipping is available to XXXXX XX United States, please re-enter."
I did some tests and I found out the result is very random. Under the "Estimated Shipping" tool, sometimes I can get a quote but sometimes I cannot. Yes, the state and zipcode I used are matched/valid.
Assuming my store is located in TX 75201 (which I set in the plug-in, not sure if it is related). Here are some data points:
For the following combinations, I can get a quote:
WI 53105
HI 96769
GA 30303
FL 32819
MN 56181
CA 92595
For the following combinations, I cannot get a quote:
VA 22630
GA 30097
FL 32128
MN 55987
CA 90275
In the log file, if I cannot get a quote, here is the response
Code:"response": { "errors": [ { "code": "111542", "message": "Invalid Destination." } ]
I'm guessing (keyword) that the fail-to-quote on some of those state/zip combinations is that UPS now requires a City to further determine whether an address is valid to quote.
I ran a test with a zipcode near me in Florida (34957) that spans a couple of counties (fun for sales tax). On the shipping estimator, I was met with the same message/UPS return code. When I signed in with a full-up address that included a city "Jensen Beach", quotes were supplied.
I'm not sure at this time how to "deal with" that, other than possibly modifying the message to indicate that the customer might try signing in so that their full address is presented for the quote.
I just downgraded this plug-in back to v1.3.8 using the old API in my testing site. This issue was resolved. So it should be related to the API.
Not sure if UPS will fix it in the nearly future.
Yeah, this issue is not very critical, since I can get a valid quote during the checkout.
Update. I just modified UpsOAuthApi.php file to use the old API. The "Estimated Shipping" issue was resolved.
Around line 26, change
toCode:const API_RATING = 'api/rating/v2409/Shoptimeintransit'; //- Gives *all* UPS shipping methods for a given From->To address. const API_RATING_SUBVERSION = '2409';
Around line 288, comment out this line.Code:const API_RATING = 'api/rating/v1/Shop'; //- Gives *all* UPS shipping methods for a given From->To address. // const API_RATING_SUBVERSION = '2409';
The old API still works today, but not sure when it will be retired by UPS.Code:'SubVersion' => self::API_RATING_SUBVERSION,