USPS plugin not working correctly

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
After the post office api update on the 23rd
The plugin returns erroneous Rate of 0.00 for Media Mail
Using 4.4 Nop Commerce

Some other sites (non nop reporting similar issue.
Here is what one vendor found when researching the problem.

Hi,

Thanks. So looking into it, I found that USPS indeed send the "Rate" with a 0 value. However, It also sends a "CommercialRate" with the shipping fee. I looked online for more information about this, and it seems that merchants can negotiate with USPS to get lower fees which are labeled as "Commercial Rates" and that's apparently what this is.
The USPS plugin so far was only taking into account the "Rate" value. So, I've made a patch to be able to use the rate based on what USPS provides and it seems to be working fine on your website.
I suppose you must have recently talked to USPS to lower your shipping fees and that's why you got that issue as the plugin never supported this, and it's kind of strange to send 0 for the Rate when there is a commercial rate instead of just providing the smaller fee directly in the same variable of the API.
Anyways, the patch is included on our end. So you can download the install package of the latest version of HikaShop on our website and install it on yours to get it for your live website.
1 year ago
Note that nopCommerce Team's USPS plugin does not have any Settings for "Use commercial rates" (i.e. no setting similar to the setting in the UPS plugin "UPS Customer Classification: Rates Associated With Shipper Number", which I believe gets the "negotiated rate"), so it always looks at the <Rate> tag.
(What version of nopCommerce are you using? If the nopC team does update the plugin, they may only do it in the 4.60 version.)

FYI, here's the USPS 2023 Updates doc:
https://www.usps.com/business/web-tools-apis/archive/2023-web-tools-release-notes-1-1.pdf
And the related section:
RateV4 API Updates:
o All Commercial and Commercial Base (CBP) prices will return in <CommercialRate> tag.
     • Note: currently products with Commercial prices (i.e., Media Mail, Library Mail, Parcel Select Ground, Bound Printed Matter etc.) return in <Rate> tag with Retail prices. Only Commercial Base (CPB) prices return in <CommercialRate> tag. Effective January 22, 2023, Commercial prices will return in <CommercialRate> tag instead of <Rate> tag.
     • Priority Mail Express (PME) and Priority Mail (PM) Commercial prices will return in <CommercialRate> tag.

o All Retail prices will return in <Rate> tag; Commercial prices will no longer return in this tag.


RE: "... Note: currently products with Commercial prices (i.e., Media Mail, ...">
I don't know why Media Mail is considered a "products with Commercial prices".  I thought getting Commercial prices was based on signing up for and printing your labels, regardless of the service type.  I'm sure that I can personally go to my local post office and get Media Mail rates (as long as I'm really sending 'acceptable' items ;)


(P.S.  RE: "Forum:Bug Reports".  Although a nopC code change is needed, USPS just did the update, so it's not exactly a "bug:  ;)
1 year ago
Thanks a lot for reporting and details. I've just created a work item
1 year ago
Thanks
We are currently using 4.4 and will be upgrading to 4.5 soon.
So please let me know when the USPS plugin is updated and if there is something special I need to do for the 4.4 or 4.5 versions.

In the meantime since I am using Shipping Director I simply override the 0.00 rate for Media Mail with the price for our average weight package.
1 year ago
Also You probably need to be sure to return the commercial rate only when it is non zero.
If commercial is non zero then return it otherwise return rate as currently done.
1 year ago
It looks like the Post Office corrected the situation on its own.
Media Mail is now working correctly.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.