Hello all,

Thank you to the Ubercart contributors, you all rock!

So... USPS sent out an email that reads:

----
Web Tools Customer,

USPS will release updates to the Web Tools APIs on 28 July 2013. The staging environment is currently open for testing your updated applications. You may review staging information and the release notes at the USPS Web Tools site here for more details.

If you rely upon a third-party developer (e.g. software or ecommerce/cart provider) for USPS products and services on your website or your shipping application, please direct any application-specific questions to them.

For questions and concerns, please contact our customer support at 1-800-344-7779 or uspstechsupport@esecurecare.net.

Regards,
Web Tools Program Office
----

Here is a link to the Release Notes:
https://www.usps.com/business/web-tools-apis/2013-july-webtools-release-...

At the very least, this is a heads up for you guys in case you haven't seen it, but also I am interested in knowing if you see any cause for concern, or anything that will need to be fixed in the Drupal 6 version of Ubercart's uc_usps piece.

Thanks again!

CommentFileSizeAuthor
#8 uc_fix_usps_service_label-2047795-8.patch603 bytestrrroy

Comments

benjaminbradley’s picture

I'm interested in the answer to this question as well. subscribing to thread.

lumun’s picture

Has anyone been able to receive quotes using the new staging URL for queries? The test URL is http://stg-production.shippingapis.com/ShippingApi.dll and reading through the documentation I found that the primary change is that the 'Express Mail' is now called 'Priority Mail Express,' but I have been unable to get successful responses to queries.

It seems to me that the module will need to be patched or the uc_usps module will stop working correctly on Sunday.

strings6’s picture

Has anyone heard from Ubercart folks on this at all? I just called and spoke to USPS and it is definitely happening Sunday.

Any note that a module maintainer can post about the status of uc_usps would be much appreciated. When I read through the release notes for Ubercart, I didn't see any mention in the stable or dev versions from 2013-Jul-11 and 2013-Jul-17 (though I could have missed it).

tr’s picture

Category: support » task

I am aware of the coming changes. They are very minor, and for the most part everything should continue to work. If something breaks just post the details here and I'lI get a patch out.

It's been discussed in detail before - the way USPS manages these changes makes it impossible to transition cleanly, so we just have to deal with problems if and when they occur.

strings6’s picture

Thank you TR. So far what I can see is there may be a display issue on the checkout page after quotes are returned from USPS.

Before Sunday, I did a test with a fake address of:
123 Test St
Paris, France 75008

I got a nice clean USPS shipping rate back. This morning it looks like this:

Priority Mail International<sup>®</sup> (1 package): $44.50

So now it has a handful of HTML entities displaying. Does anyone else have the same problem, or found any others?

lumun’s picture

@string6

I have noticed the same issue. It appears that the API update has changed how trademark symbols are displayed. In uc_usps.module, near line 400 (depending on your version), simply add these lines:

'<sup>®</sup>'   => '®',
'<sup>™</sup>' => '™',

Worked for me! I kept the other markup in place just in case they decide to switch it back.

Cheers!

millenniumtree’s picture

Thanks! That worked great.
If USPS could just nail this down and not touch it, I'd be happy.

trrroy’s picture

StatusFileSize
new603 bytes

Here's a patch for #6.

trrroy’s picture

Status: Active » Needs review
strings6’s picture

The patch in #8 worked great for me.

Thanks everyone!

I won't close out the issue just yet, in case someone finds more issues from the API update, but after Day 1, this appeared to be the extent of it.

Status: Needs review » Needs work

The last submitted patch, uc_fix_usps_service_label-2047795-8.patch, failed testing.

longwave’s picture

Version: 6.x-2.12 » 6.x-2.x-dev
Status: Needs work » Needs review
longwave’s picture

kap316’s picture

Since this USPS update, During checkout, it only displays Priority Mail. First Class is no longer an option. Media Mail works fine (I added it as an optuion just to check it), but still no first class. It has to be due to the usps update because I didnt update or change anything in the settings prior. One day it worked. The next (after the USPS update) it did not.(for the same product).

Anyone have a solution or experiencing the same problem?

fineartist99’s picture

Version: 6.x-2.x-dev » 7.x-3.4

Awesome! I altered my "uc_usps.module" file with the above - replacing what was there

'<sup>&reg;</sup>' => '®',
'<sup>&trade;</sup>' => '™',

with what you posted
'<sup>®</sup>' => '®',
'<sup>™</sup>' => '™',

and now the trademark symbols are coming through. Thank you. And BTW I'm using version 7.x-3.4

tr’s picture

This is a fine example of the problems we've had with the USPS API over the years. Last time, when USPS changed their web service to include HTML and double-encoded HTML in the returned service names, that change was never announced or documented. This time, they *did* say that the service names would have double-encoded HTML (although they don't seem to recognize that *double*-encoding the HTML is just wrong...), and they list all the service names complete with the double-encoded HTML. However, they got it wrong again! For the first time they documented that they would be returning, e.g. &lt;sup&gt;&reg;&lt;/sup&gt; (which is what they used to return) but now after the change they actually return &lt;sup&gt;&#174;&lt;/sup&gt;, which contradicts the documentation.

So, aside from the HTML thing, which should be fixed by the patch in #8, we have one other report of problems with First-Class mail. The API change documentation doesn't contain anything which indicates First-Class would be affected, aside from the HTML.

@kap316: Did you apply the patch before you tested First-Class mail? Because the patch is necessary for First-Class to work... If you did apply the patch and First-Class still doesn't work, please turn on shipping quotes debug, try to get a quote for First-Class, then paste the debugging output here (edit out your customer ID and be sure to wrap the whole thing in <code></code> so we can read it).

Desertgirl’s picture

I had this issue as well on a site running D6. Here is what I did--it was very easy:

I copied the two lines from the patch where the lines begin with '+'

'<sup>®</sup>' => '®',
'<sup>™</sup>' => '™',

and pasted them under the existing lines of code:

'<sup>&reg;</sup>' => '®',
'<sup>&trade;</sup>' => '™',

but before this line:

'**' => '',

And removed the '+' from the beginning of those two lines.

It worked perfectly! Thank you very much for the patch!

As mentioned, the First Class option is no longer available, which in my case doesn't matter currently. But strangely the 'Priority Mail' option is gone and we only are given 'Priority Mail 1-Day' and 'Priority Mail 2-Day'. The 2-day option is more expensive than the 1-day option. Is anyone else seeing this? Argh... Help!

tr’s picture

Status: Needs review » Postponed (maintainer needs more info)

@Desertgirl: To figure out the First-Class problem and the Priority Mail problem you mentioned, we will need the information I asked for in #16:

please turn on shipping quotes debug, try to get a quote for First-Class, then paste the debugging output here (edit out your customer ID and be sure to wrap the whole thing in so we can read it).
longwave’s picture

Committed #8 to both branches.

For anyone seeing the First Class and Priority Mail problems, please provide debugging output.

sah62’s picture

The First Class shipping option reappeared for me and the HTML issues were fixed after installing the most recent development version.

longwave’s picture

Status: Postponed (maintainer needs more info) » Fixed

As this thread has been quiet for over a week now, it seems like all USPS problems caused by the July update are fixed. If not, please reopen the thread and include debug information.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

texas-bronius’s picture

New to the old party here.. If USPS API is vacillating between one of two conventions (and ubercart shipping quote users of different versions of UC have to dance to keep up), wouldn't it make sense to expect and handle both formats?

[edit]Oh I see the patch is already doing just that.. thanks[/edit]

joshuautley’s picture

#8 Worked for me. Thank you.

luf’s picture

#8 is the winner, thank you for the update much appreciated.

dsnopek’s picture

Issue summary: View changes
Status: Closed (fixed) » Reviewed & tested by the community

The patch in #8 works for me (and it looks like several others as well!).

longwave’s picture

Status: Reviewed & tested by the community » Closed (fixed)

This patch has already been applied to the -dev version and will be included in 7.x-3.6 and 6.x-2.13 when they are released.

dsnopek’s picture

Ah, sorry, I saw it go from "Postponed" to "Fixed" - it wasn't clear that it got committed. Thanks!