USPS fix for November 2013 for oscommerce based carts

USPS, in an unannounced move last Friday 8th November, decided to change the way it supplied rates information via its servers to the many ecommerce carts around the global who request realtime USPS quotes. They changed the transfer-encoding to chunked. This is a more efficient way for this data to be transferred, so not really before time.

However it caught out a number of old usps modules which relied on an ever growing number of filters to clean up the rates data xml, because these scripts relied on the old http_client class which didn’t support dechunking this data cleanly.

For those modules that called upon curl this change would have made no difference, eg zencart, whose usps script uses curl primarily and only fallsback to http_client as a last resort.

Free code download I’ve modified the oscommerce usps USPS Rate V4 Intl Rate V2 module to check and use curl. This is written for Loaded Commerce 6.5 but can be modified for other version use.

 

download :