USPS2 Not Providing Rates

  • Posts: 126
  • Thank you received: 8
  • Hikaserial Standard Hikashop Business
1 month 2 weeks ago #368579

nicolas wrote: Hi,

Thanks for your feedback.

- For the name of the services in the plugin settings, I've made a modification for this for the next version of the plugin.

- For the plugin version, same, I've made a modification for this for the next version.

- For the name of the services in the email and order details in the backend, I'm not able to reproduce the issue anymore. I don't see why @gpraceman would still have the issue. Could you please double check ? Do you also have the issue @jazzmang ?

- Regarding "if you have a "FIRST-CLASS_MAIL" check, you can only receive FIRST-CLASS_MAIL rates", I'm also not able to reproduce the problem. I've tested the current version of the plugin with both package services and the new FIRST-CLASS_MAIL services checked, and when the product in the cart had dimensions and weight of a letter or flat I would get the FIRST-CLASS_MAIL service rate, and when they would exceed the limits of a flat, the plugin then switched automatically to package rates. Could you please double check ?

- Regarding the Priority Mail rate being high, I'm surprised you get these results. I actually have the rate for Priority Mail just a few dollars above the rate for Ground Advantage on my tests. Could it be you have "NONSTANDARD" selected, or the "Has non standard characteristics" checkbox checked on your end which would lead to the high Priority Mail rate on your end ?
I also can't compare to the old plugin on my end as I don't have a USPS WebTools User ID. The old USPS plugin was made by a third party developer and donated to us years ago. We only maintained the plugin.
This might require checking the situation directly on your website with some backend and FTP access in order to really understand what's going on.


Yes, I'm still having that problem with the order emails and when viewing the order in the admin console. See attached screenshots.





I do see an oddity where the Priority Mail Express rate is substantially lower than the Priority Mail rate. Should be the other way around. I have the "Processing Category" set to "Machinable", "Has non standard characteristics" set to "No" and "Commercial" rates.

Attachments:
Last edit: 1 month 2 weeks ago by gpraceman.

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 8
  • Hikaserial Standard Hikashop Business
1 month 2 weeks ago #368580

Strange. I made some minor tweaks to the product dimensions for my test products and now the Priority Mail rate is cheaper than the Priority Mail Express rate (as it should be).

Last edit: 1 month 2 weeks ago by gpraceman.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #368582

#1 - The text, instead of variable names, now appears in the plugin correctly.

#2 - The 0.5oz decal with dimensions of L3.25in x W1.25in x 0.1in is still not yielding any results. The debug file just says

USPS 2: No shipping services available for the shipping address provided.
09.17.25 19:19:01

USPS 2: No shipping services available for the shipping address provided.
09.17.25 19:27:06

USPS 2: No shipping services available for the shipping address provided.

The old USPS plugin and usps.com itself both provide me with the same rates.

#3 - With NONSTANDARD vs MACHINEABLE, at least with Priority & Ground Advantage that we use, the results vary by weight/height/dimension, which will yield different results.

For instance, we have a book that is 9oz, 11 x 9 x 0.5 inches, and if ordered by itself, will only show results if I use MACHINEABLE. However, it provided the incorrect rate for Priority Mail ($34.35 vs. $13.30). It displays no results under 'NONSTANDARD' in the cart, but the debug output does show results coming back in an array.

File Attachment:

File Name: report_2025debug.txt
File Size:402 KB


In the debug array, it lists USPS Ground Advantage Machinable Single-piece for the correct amount ($9.50), but it isn't being displayed because I believe the processingCategory is MACHINABLE in the results.

And, if I switch to a different product that is 8lbs, 42 x 1.25 x 1.325 inches, ordered by itself, MACHINEABLE results in nothing. It requires using NONSTANDARD to get correct results for Priority Mail and Ground Advantage.

If both of these products are in the cart, the NONSTANDARD works, but the MACHINEABLE does not. There is a minimum that is not being met with NONSTANDARD, which would normally be met. Sometimes, a product's dimensions by themselves are not indicative of the actual shipping container.

The processingCategory being submitted doesn't seem to limit the results returned by USPS, and my guess is the plugin is doing the filtering.

This might explain why USPS.com itself and the old plugin provide results (with or without dimension) when the new one doesn't, despite returning hits in the array. I'm wondering if the plugin shouldn't be filtering in some cases.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 8
  • Hikaserial Standard Hikashop Business
1 month 2 weeks ago #368584

I tried with Version 1.3.1 of the plugin and do now see that plain text is being used instead of the variable names.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 84624
  • Thank you received: 13762
  • MODERATOR
1 month 2 weeks ago #368601

The text, instead of variable names, now appears in the plugin correctly.

Great !

The 0.5oz decal with dimensions of L3.25in x W1.25in x 0.1in is still not yielding any results. The debug file just says
USPS 2: No shipping services available for the shipping address provided.

I found the issue for this. It's because I hadn't tested with just the letter service selected in the shipping method.
It's the line:
if(empty($mailClasses)) {
which needs to be changed to:
if(empty($mailClasses) && !$letters) {
in plugins/hikashopshipping/usps2/usps2.php
I'll be adding that for the next version.

The processingCategory being submitted doesn't seem to limit the results returned by USPS, and my guess is the plugin is doing the filtering.

It's indeed the case. The total rates endpoint doesn't let us specify a processingCategory. So it returns everything possible. And so I made the option and done the filtering on my end upon receiving the rates.
Potentially, we could add a third option "auto" to the "processing category" setting, so that it would accept any rate from USPS, as long as it is returned, and if several are returned, it would provide the cheapest for the service. What do you think ?

Sometimes, a product's dimensions by themselves are not indicative of the actual shipping container.

Note that the plugin only combine the dimensions and weight of the products in the cart and send that information to USPS.
If you know that the dimensions of the package for a product are higher than the product itself, you likely want to enter the dimensions of the package the product will be in, not the product's.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #368626

nicolas wrote: Potentially, we could add a third option "auto" to the "processing category" setting, so that it would accept any rate from USPS, as long as it is returned, and if several are returned, it would provide the cheapest for the service. What do you think ?


That might work, but I'm not sure. I still think rateIndicator might be needed, even if it will be a single piece most of the time.

I looked at the Domestic Mail Manual (DMM), which is referenced, but the link is broken in their API doc. The correct link is at pe.usps.com/text/dmm300/dmm300_landing.htm .

For Priority Mail ( pe.usps.com/text/dmm300/123.htm ), it explains that the minimum postage amount per addressed piece is the 1-pound price. i.e., there are no minimum dimensions, but just maximum dimensions. At least for packages (letters, flats, and envelopes are different).

The same goes for Ground Advantage, pe.usps.com/text/dmm300/133.htm .

Dimensions are factored in only for larger packages, along with their weight; however, even then, it must be quite substantial, likely above the maximums. I think this is where rateIndicator would be helpful for those odd shapes/oversized products, which is what we currently have to do with the old plugin in a very clunky way, using warehouses in HikaShop to target those items. Having access to rateIndicator could enable better handling of these unusual package types and reduce the number of shipping methods to manage, or at least to better target them to the correct service.

I'm unsure whether USPS is ignoring their own dimensional requirements in the API, as indicated by their website's rate lookup (where we don't enter dimensions), or if they are setting some kind of default/minimum "package" dimensions that aren't documented.

I'm starting to suspect that they are using maximum dimensions as their defaults for Priority Mail and Ground Advantage. That would make the weight the determining factor, which is what the old plugin results kick back despite not having dimensions set on products.

My concern is ensuring that multiple small products in an order don't combine to meet a hidden threshold with USPS for the rates, but in reality, the boxes we put them in meet the threshold. And I don't think adding a percentage additional will solve that.

Ultimately, I'd have to test multiple combinations to see if we get the correct results.

Last edit: 1 month 2 weeks ago by jazzmang.

Please Log in or Create an account to join the conversation.

  • Posts: 84624
  • Thank you received: 13762
  • MODERATOR
1 month 2 weeks ago #368636

Hi,

Thanks for the details.

I've just made a new version of the plugin available.
It contains the fix for the letter service, as explained in my previous message.
And I've also added back a rate indicator setting. Now, you can select several of them.
The plugin will filter the rates returned by USPS based on what you select in that setting, like the processing category. And if no rate indicator is selected, it will take them all into account.
I've also added the "all" choice for the processing category setting.
Hopefully, with all this, the plugin should now cover everything.

Please Log in or Create an account to join the conversation.

  • Posts: 275
  • Thank you received: 25
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 1 week ago #368675

I had some time to do some testing, and it seems to be better, but I need to do more.

I think there might be something not quite right with letters/first-class mail, but I haven't been able to isolate it yet.

It will be a few days before I can test and provide further updates.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.096 seconds
Powered by Kunena Forum