USPS2 Not Providing Rates

  • Posts: 126
  • Thank you received: 8
  • Hikaserial Standard Hikashop Business
4 months 3 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: 4 months 3 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
4 months 3 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: 4 months 3 weeks ago by gpraceman.

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

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
4 months 3 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
4 months 3 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: 85053
  • Thank you received: 13870
  • MODERATOR
4 months 3 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: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
4 months 3 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: 4 months 3 weeks ago by jazzmang.

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

  • Posts: 85053
  • Thank you received: 13870
  • MODERATOR
4 months 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: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
4 months 2 weeks 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.

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 23 hours ago #369945

Hi Nicolas,

Sorry, I'm late getting back to this.

I've been absolutely swamped, but found the situation with minimum volume/dimensions.

I connected first about this with the USPS API development team during one of their seminars.

They said there is a minimum per service, as noted at pe.usps.com/text/dmm300/welcome.htm .
I noted to them that there was no minimum, only a maximum, as with UPS Ground Advantage, and they said to figure it out.

From what I can test with USPS Ground, it is 1x1x1 inch for USPS Ground Advantage.
First-Class goes as low as 0.001 x 0.001 x 0.001 inch.

The problem arises when an order contains multiple small products, such as small paper-thin decals. Together, they can exceed the First-Class Mail weight limit (the total cart weight must stay under 1.5 oz because you still have to add the envelope, invoice, etc.), or they can exceed the USPS 3.5 oz max for letters (first-class mail) yet still remain below the Ground volume limit.

Simply setting all products to a minimum size of 1x1x1 creates issues with other services, so that is not a viable solution.

Adding dimension approximation (%) either has no effect or doesn't work - not sure which. It also doesn't seem like a good idea in general to use a %, as we need to ensure we meet a minimum. It would be better as a numeric value added to the cart total (cubic volume), not as a %, which can be very hit-or-miss.

The only other suggestion I have is to add the option to specify a minimum set of dimensions or volume to send to the API if the calculated products in the cart don't meet it. That way, we can at least set up a method that, when it falls into such a situation, triggers something like USPS Ground Advantage.

I think that will be much easier than determining the undocumented minimum cubic volume for all USPS services, while also providing flexibility to address situations like the one above.

We already have multiple methods set up to trigger specific USPS services under specific conditions, but they are weight-based, and the situation above is falling through the cracks because we cannot meet the minimum volume for some services, even though we will in reality.

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

  • Posts: 85053
  • Thank you received: 13870
  • MODERATOR
1 month 20 hours ago #369946

Hi,

Thanks for the detailed feedback and investigation on this issue.

I've just released version 1.4.4 of the plugin which addresses the minimum dimension problem you've described.

The issue was that when an item doesn't qualify for letter/first-class shipping (due to weight limits, multiple packages, etc.), the plugin falls back to the package API. However, the USPS package API has undocumented minimum dimension requirements that weren't being enforced.

The plugin now automatically applies the USPS minimum dimensions for machinable parcels (6" x 3" x 0.25" as per the USPS Domestic Mail Manual section 3.2.1) when using the package rates API. This ensures that small items like your decals will now get valid rates from services like USPS Ground Advantage when they exceed the first-class mail weight limits.

The letter API still uses the actual product dimensions, so thin items shipped as letters/flats will continue to work as expected.

You can find the official USPS minimum size requirements here: pe.usps.com/text/dmm300/101.htm

Please update to version 1.4.4 and let me know if this resolves the issue for your small decal products.

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

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
4 weeks 2 days ago #369966

We couldn't find the minimums in section 3.2.1 of pe.usps.com/text/dmm300/101.htm , which you mentioned.

It appears the 6" x 3" x 0.25" either is not kicking or something in the plung-in isn't working right.

I'm still encountering situations where it returns no rates or incorrect rates with the wrong processing category.

Stay with me, because below is the result of hours of trial and error and parsing USPS documentation.

I am also pretty sure we discovered a bug or two in which the weight unit is used with LETTERS and FLAT processingCategory.

It started with testing an item with one 3.75 x 0.313 x 0.028, 1.5oz, up to 8 of the same decal in the cart produced a first-class letter metered at $0.74.
That seems OK.

NOTE: it should be $0.78, not metered, when using retail, I believe, since Account Type is NONE

The quantity 9+ is where we first see a problem: no rate is returned.

In the debug log, it returns:

[message] => Provided dimensions do not meet minimum allowed for First Class Flats.
            [errors] => Array
                (
                    [0] => Array
                        (
                            [title] => Provided dimensions do not meet minimum allowed for First Class Flats.
                            [detail] =>
                            [code] => 030018

Note that it changed the category to [processingCategory] => FLATS vs LETTERS; it was previously (in the log), which seems odd.

Checking our current plugin settings:
  • USPS Account Type is NONE.
  • Priority Mail, Ground Advantage, and First-Class Mail selected.
  • Processing category is set to MACHINABLE (but setting it to ALL has the same results).
  • The rate indicator restriction only has Single Piece selected.
  • Price type is Retail

My understanding is that the changes in v1.4.4 of the plug-in should make it MACHINABLE under those conditions, not LETTER or FLATS

This is when I started to suspect that the plugin's minimums were wrong, but something else was wrong, too.

Per pe.usps.com/text/dmm300/101.htm :

For LETTERS:
Minimum is 5" x 3.5" x 0.007"
Maximum is 11.5" x 6.125" x 0.25"
Max weight is 3.5oz

For FLATS
Minimum is 11.5" x 6.125" x >0.25"
Maximum is 15.5" x 12" x 0.75"
Maximum weight 13oz.

In debug mode, when a dimension doesn't meet the minimum for a processingCategory, it defaults to the above minimum, or at least LETTERS and FLATS.

i.e., if I set the product dimension to be less than the minimum, USPS returns results for the minimum dimensions (below).
<pre>Array
(
    [weight] => 0.03125
    [length] => 5
    [height] => 3.5
    [thickness] => 0.007
    [processingCategory] => LETTERS
)
</pre>

Seems fine until we test a HikaShop product with a weight of 14 and a unit type of oz.

I'm stressing that this is the unit type set in Hikashop for the product: oz, not lbs.
<h3>01.09.26 19:20:06</h3>
<pre>Array
(
    [weight] => 0.875
    [length] => 11.5
    [height] => 6.125
    [thickness] => 0.25
    [processingCategory] => LETTERS
)
</pre>
<h3>01.09.26 19:20:06</h3>
<pre>Array
(
    [totalBasePrice] => 0.74
    [rates] => Array
        (
            [0] => Array
                (
                    [SKU] => DFLL0XXXXR00010
                    [description] => First Class Letter Metered
                    [priceType] => RETAIL
                    [price] => 0.74
                    [weight] => 0.875
                    [fees] => Array
                        (
                        )

                    [startDate] => 2025-10-05
                    [endDate] => 2026-01-17
                    [warnings] => Array
                        (
                        )

                    [mailClass] => FIRST-CLASS_MAIL
                )

        )

)
</pre>

We get a result for a LETTER, not FLAT or MACHINEABLE, despite [weight] => 0.875 or above.

My guess is that HikaShop is converting 14 oz to 0.875 lb, which seems reasonable, but it is still above the 3.5- and 13-oz maximums for letter and flats.

But we entered up to 56 oz (3.5 lb) in the HikaShop product, and it still returned LETTERS results.

Obviously, you can't fit 3.5 lbs in a letter envelope.

It is when we got to 56.1 OZ (above 3.5 lbs) in Hikashop that it finally broke:
<pre>Array
(
    [weight] => 3.5000625
    [length] => 11.5
    [height] => 6.125
    [thickness] => 0.25
    [processingCategory] => LETTERS
)
</pre>
<h3>01.09.26 19:29:57</h3>
<pre>Array
(
    [apiVersion] => /prices/v3
    [error] => Array
        (
            [code] => 400
            [message] => Provided weight exceeds maximum allowed for First Class Letters.
            [errors] => Array
                (
                    [0] => Array
                        (
                            [title] => Provided weight exceeds maximum allowed for First Class Letters.
                            [detail] =>
                            [code] => 030014
                        )

                )

        )

)
</pre>
<h3>01.09.26 19:29:57</h3>
<pre>Array
(
    [apiVersion] => /prices/v3
    [error] => Array
        (
            [code] => 400
            [message] => Provided weight exceeds maximum allowed for First Class Letters.
            [errors] => Array
                (
                    [0] => Array
                        (
                            [title] => Provided weight exceeds maximum allowed for First Class Letters.
                            [detail] =>
                            [code] => 030014
                        )

                )

        )

)
</pre>

It seems one side uses OZ, and the other uses LBS.

Converting to LBS in HikaShop doesn't fix the problem either.
i.e, setting the product to 0.875 lb (14 oz) yields LETTERS.

It only breaks when the [weight] value exceeds 3.5, according to the debug log.

I'm not sure where the conversion problem is occurring (on the USPS side or the plug-in side).

Now back to FLATS and dimensions.

Weight-wise, if you set any of the dimensions above the minimum (thickness/height is the easiest), it goes to FLATS:
<pre>Array
(
    [weight] => 13
    [length] => 11.5
    [height] => 6.125
    [thickness] => 0.251
    [processingCategory] => FLATS
)
</pre>
<h3>01.09.26 19:38:34</h3>
<pre>Array
(
    [totalBasePrice] => 5.04
    [rates] => Array
        (
            [0] => Array
                (
                    [SKU] => DFXF0XXXXR00130
                    [description] => First Class Flats
                    [priceType] => RETAIL
                    [price] => 5.04
                    [weight] => 13
                    [fees] => Array
                        (
                        )

                    [startDate] => 2025-10-05
                    [endDate] => 2026-01-17
                    [warnings] => Array
                        (
                        )

                    [mailClass] => FIRST-CLASS_MAIL
                )

        )

)
</pre>

But the same issue as with LETTERS, USPS sees 13 oz, not 13 LBS, despite it being 13 LBS in HikaShop:
<h3>01.09.26 19:44:16</h3>
<pre>Array
(
    [weight] => 13.001
    [length] => 11.5
    [height] => 6.125
    [thickness] => 0.251
    [processingCategory] => FLATS
)
</pre>
<h3>01.09.26 19:44:16</h3>
<pre>Array
(
    [apiVersion] => /prices/v3
    [error] => Array
        (
            [code] => 400
            [message] => Provided weight exceeds maximum allowed for First Class Flats.
            [errors] => Array
                (
                    [0] => Array
                        (
                            [title] => Provided weight exceeds maximum allowed for First Class Flats.
                            [detail] =>
                            [code] => 030015
                        )

                )

        )

)
</pre>

However, if I adjust one of the dimensions above the maximum for FLATS (thickness/height against the easist, i.e., 0.751), it returns MACHINEABLE results!

But now it is giving us price results for lbs pricing (i.e., USPS lbs matches HikaShop lbs).

For dimensions and parcels, it seems that if any dimension exceeds FLAT's maximum, MACHINABLE will be returned. I found using the height/thickness to be the easiest, i.e., 0.75,1 but that's also generally where our problem is with thin decals. Others could have issues with width or height. It may be that we are yet to discover those products in our own catalogs.

I'm not sure what the best approach is, but the weight issue has to be fixed; otherwise, LETTERS and FLATS have real issues.

I'm not sure what the best approach is to ensure results are returned in the plug-in itself.

Obviously, the minimum and maximum values for productCategory define a range for LETTERS and FLATS; anything above those should be classified as MACHINEABLE.

I think it's the range of the minimum and maximum values for both weight and dimensions that is making it difficult.

Two other things came out of this as well, which may be a bug in the plug-in, I'm not sure:
  1. What we set the plug-in's pricing didn't matter for FLATS and LETTERS, the results always returned retail
  2. What we set the processing category to didn't seem to matter, LETTERS and FLATS are not listed but are used - I expected ALL to be required to get FLATS and LETTERS results

I hope the above helps. I'm sorry for the long post, but I wanted to share what we found and tested.

Last edit: 4 weeks 2 days ago by jazzmang.

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

  • Posts: 85053
  • Thank you received: 13870
  • MODERATOR
4 weeks 2 days ago #369968

Hi,

Thanks for the detailed testing and feedback. I've released version 1.5.0 which addresses, I think, all the issues you've identified.

Please update to version 1.5.0 and let me know how it works for you.

The following user(s) said Thank You: jazzmang

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

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
4 weeks 4 hours ago #369983

Thanks.

Initial testing looks promising. I'll do more extensive testing later and report back.

For FLATS and LETTERS, is there a way to add a fixed weight (not a %) to the cart to account for the envelopes?

I tried using the formula field but couldn't make it work, and an additional weight % field would introduce too much variability.

We can and do restrict Hikashop methods by weight range to specifically target FLATS and LETTERS products, but the actual envelopes used are not factored into the weight submitted via the plugin to USPS.

That can change the actual weight on the scale and, in turn, affect prices when you go to the post office for these lower-weight services.

It may not sound like much, but even a standard #10 envelope adds 0.25 ounces, which can lead to higher-than-expected shipping costs when not factored in.

The LETTERS and FLATS envelopes used can vary slightly, but a seller typically standardizes on a specific envelope/package material so they know the weight & dimensions used in advance, regardless of the product content. e.g., plan envelopes, those with built-in padded/bubble wrap, or flat cardboard, are used to prevent bending.

The fixed additional weight isn't something we can add per product; it is a per-order thing, as the same envelopes are used regardless of the number of decals/products ordered (within the prescribed ranges). Nor does adding a fixed $ or % price to the shipping method work, as the order is ultimately subject to weight-based variability that affects the rate and the services returned.

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

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
4 weeks 3 hours ago #369984

Also, is there a way to require dimensions on products and variants to be entered, since dimensions are required for the new USPS plugin to work?

Employees have been trained for years not to take/enter dimensions on products, and requiring it is much more reliable than just telling them.

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

  • Posts: 85053
  • Thank you received: 13870
  • MODERATOR
3 weeks 6 days ago #369988

Hi,

Thanks again for your feedback. I've added options for packaging weight and made a new release of the plugin.

Regarding making the dimensions mandatory, there is currently no mechanism for that. But it's a good idea. We'll be implementing something for this with the next version of HikaShop.

The following user(s) said Thank You: jazzmang

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

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
3 weeks 5 days ago #369992

Retail and Commercial Pricing settings now work (cannot test Contract).

With LETTERS and FLATS, I cannot find a way to offer "Priority Mail" or "Priority Mail Express" for low-weight orders under 13oz (some people really want their items faster, not just cheaper). It just returns First-Class Mail regardless of the options enabled in the plugin.

USPS offers them ( simple example from their online lookup tool's results).

I've tried every Priority Mail and Express option in the plugin to get it to apply to low-weight items (under 13 oz), but no luck. It only returns on result in the debug.

But even above 13 oz, not all results are displayed in the cart when the options are checked in the plugin (and above 13 oz, the results are in the debug).

The Priority Mail option appears with the old plugin, side by side with the new plugin, for over 13oz and under 13oz.

In debug for over 13oz, I can see things like Priority Mail Padded Flat Rate Envelope, Priority Mail Legal Flat Rate Envelope, Priority Mail Machinable Small Flat Rate Box, Priority Mail Machinable Large Flat Rate Box APO/FPO/DPO, Priority Mail Machinable Single-piece, Priority Mail Machinable Medium Flat Rate Box, Priority Mail Express Flat Rate Envelope, Priority Mail Express Padded Flat Rate Envelope, etc. results returned, but the prices are not displayed in the cart.

See attached debug sample for 1 lb order.

The only results we see in the cart are:
USPS (new) Priority Mail $11.90
USPS (new) USPS Ground Advantage $11.00
USPS (new) Priority Mail Express $33.40

That is, despite Priority Express Mail, Priority Mail, Ground Advantage, and First-Class Mail with Processing Category ALL, with the following Rate Indicator Restriction checked:

[DR] Dimensional Rectangular
[E4] Priority Mail Express Flat Rate Envelope - Post Office To Addressee
[E6] Priority Mail Express Legal Flat Rate Envelope
[E7] Priority Mail Express Legal Flat Rate Envelope Sunday / Holiday
[FA] Legal Flat Rate Envelope
[FB] Medium Flat Rate Box/Large Flat Rate Bag
[FE] Flat Rate Envelope
[FP] Padded Flat Rate Envelope
[LF] USPS Connect® Local Flat Rate Box
[LL] USPS Connect® Local Large Flat Rate Bag
[LS] USPS Connect® Local Small Flat Rate Bag
[OS] Oversized
[PA] Priority Mail Express Single Piece
[PL] Large Flat Rate Box
[PM] Large Flat Rate Box APO/FPO/DPO
[SB] Small Flat Rate Bag
[SP] Single Piece

I'm not sure why only some results from the debug log aren't appearing in the cart, such as Priority Mail Express Machinable Single-piece or Priority Mail Padded Flat Rate Envelope. From the options above, I would expect them to be displayed.

For requests under 13oz, I cannot tell whether this is because we are missing something in the USPS API request, or because the API will only return results when the minimum dimensions or weight are met (i.e., above 13oz or over a max dimension). It may be a limitation of the new API, but a workaround is to allow the plugin to set minimum weight, length, width, and height for each shipping method.

But getting the results returned to show in the cart would be a priority.

FYI, we will need to use multiple shipping methods due to the girth + length limits of 108 inches (normal) and 130 inches (oversized), and set the cubic-inch restriction accordingly. This is to prevent grouping in an order with oversized items; otherwise, if you have 2 or more oversized items, no results are returned (bad request in debug).

FYI, I recommend a minimum to enable [DR] Dimensional Rectangular, [OS] Oversized, and [SP] Single Piece to get a decent range of USPS options, from letters to flats to parcels, when using Priority, Ground Advantage, and First-Class. This, in addition to "Processing Category" ALL.

Regarding the new packaging weight, I found it isn't included in the Restrictions maximum weight for a shipping method. It can cause the restriction to fail if you don't manually combine the two in the OTHER method when tiering. My recommendation would be to include the package weight in the restriction calculation.

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

  • Posts: 85053
  • Thank you received: 13870
  • MODERATOR
3 weeks 5 days ago #369994

Hi,

Thanks for the detailed feedback. I've released version 1.5.2 which addresses your concerns:

1. Priority Mail / Priority Mail Express for items under 13 oz :
The plugin now calls both the Letter API and Package API when both First-Class Mail and Priority Mail services are enabled. This means customers can now choose between First-Class Mail (cheaper) and Priority Mail / Priority Mail Express (faster) for small, lightweight items.

2. Showing multiple rate options per mail class :
When you select specific Rate Indicators in the plugin settings (e.g., FE - Flat Rate Envelope, SP - Single Piece, FB - Medium Flat Rate Box), the plugin will now show separate rates for each indicator instead of only the cheapest one per mail class. If no rate indicators are selected, the plugin maintains the previous behavior of showing only the cheapest rate per mail class.

So for example, if you select [FE], [FB], and [SP] as rate indicators with Priority Mail enabled, customers will see:
Priority Mail Flat Rate Envelope - $11.90
Priority Mail Single-piece - $15.35
Priority Mail Medium Flat Rate Box - $21.95

3. Packaging weight and shipping restrictions :
The core shipping method restrictions evaluate weight before the shipping plugin processes packages. The packaging weight is added by the plugin during rate calculation. This is normal behavior. If you're using weight-based tiers with packaging weight, you'll need to manually account for the packaging weight when setting your restriction ranges. For example, if your packaging adds 2 oz and you want to restrict to items under 13 oz, set the restriction to 12.875 oz (13 - 0.125 lb).

Please update to version 1.5.2 and let me know how it works for you.

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

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
3 weeks 5 days ago #369998

With v1.5.2, I'm not getting any results to appear in the cart other than First-Class below 13oz.
i.e. USPS (new) First-Class Mail $3.00

That's the same as before.
However I do see other options in the debug results, however (snippet below).

<h3>01.14.26 15:51:25</h3>
<pre>Array
(
    [weight] => 0.313125
    [length] => 3.25
    [width] => 1
    [height] => 0.252
    [originZIPCode] => 21813
    [destinationZIPCode] => 66503
    [priceType] => RETAIL
    [mailClasses] => Array
        (
            [0] => ALL
        )

)
</pre>
<h3>01.14.26 15:51:25</h3>
<pre>Array
(
    [rateOptions] => Array
        (
            [0] => Array
                (
                    [totalBasePrice] => 11.9
                    [rates] => Array
                        (
                            [0] => Array
                                (
                                    [description] => Priority Mail Flat Rate Envelope
                                    [priceType] => RETAIL
                                    [price] => 11.9
                                    [weight] => 0.31313
                                    [dimWeight] => 0
                                    [fees] => Array
                                        (
                                        )

                                    [startDate] => 2025-10-05
                                    [endDate] => 2026-01-17
                                    [mailClass] => PRIORITY_MAIL
                                    [zone] => 06
                                    [productName] => Priority Mail Flat Rate Envelope
                                    [productDefinition] => 1-3 day specific delivery to all U.S. states and territories
                                    [processingCategory] => FLATS
                                    [rateIndicator] => FE
                                    [destinationEntryFacilityType] => NONE
                                    [SKU] => DPFE0XXXXR00700
                                )

                        )

                    [extraServices] => Array
                        (
                            [0] => Array
                                (
                                    [extraService] => 910
                                    [name] => Certified Mail
                                    [priceType] => RETAIL
                                    [price] => 5.3
                                    [warnings] => Array
                                        (
                                        )

                                    [SKU] => DXEX0XXXXRX0000
                                )

                            [1] => Array
                                (
                                    [extraService] => 955
                                    [name] => Return Receipt
                                    [priceType] => RETAIL
                                    [price] => 4.4
                                    [warnings] => Array
                                        (
                                        )

                                    [SKU] => DXRX0XXXXRX0000
                                )

                            [2] => Array
                                (
                                    [extraService] => 911
                                    [name] => Certified Mail Restricted Delivery
                                    [priceType] => RETAIL
                                    [price] => 13.7

Above 13oz, I don't get any results for the new plugin in the cart.
I do see results in the debug log, however (short snippet).
<pre>Array
(
    [weight] => 8
    [length] => 42
    [width] => 1.188
    [height] => 1.125
    [originZIPCode] => 21813
    [destinationZIPCode] => 66503
    [priceType] => RETAIL
    [mailClasses] => Array
        (
            [0] => ALL
        )

)
</pre>
<h3>01.14.26 15:27:12</h3>
<pre>Array
(
    [rateOptions] => Array
        (
            [0] => Array
                (
                    [totalBasePrice] => 50.7
                    [rates] => Array
                        (
                            [0] => Array
                                (
                                    [description] => Priority Mail Nonstandard Single-piece
                                    [priceType] => RETAIL
                                    [price] => 32.7
                                    [weight] => 8
                                    [dimWeight] => 0
                                    [fees] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [name] => Nonstandard Length > 30
                                                    [SKU] => D812XXNXXXX0000
                                                    [price] => 18
                                                )

                                        )

                                    [startDate] => 2025-10-05
                                    [endDate] => 2026-01-17
                                    [mailClass] => PRIORITY_MAIL
                                    [zone] => 06
                                    [productName] => Priority Mail
                                    [productDefinition] => 1-3 day specific delivery to all U.S. states and territories
                                    [processingCategory] => NONSTANDARD
                                    [rateIndicator] => SP
                                    [destinationEntryFacilityType] => NONE
                                    [SKU] => DPXX0XXXXR06080
                                )

                        )

                    [extraServices] => Array
                        (
                            [0] => Array
                                (
                                    [extraService] => 910
                                    [name] => Certified Mail
                                    [priceType] => RETAIL
                                    [price] => 5.3
                                    [warnings] => Array
                                        (
                                        )

                                    [SKU] => DXEX0XXXXRX0000
                                )

                            [1] => Array

It includes Priority Mail Express Nonstandard Single-piece, USPS Ground Advantage Nonstandard Single-piece, etc., as I would expect.

Test the same product under v1.5.1 with the same settings, and it gives:
USPS (new) USPS Ground Advantage $22.05
USPS (new) Priority Mail $32.70
USPS (new) Priority Mail Express $112.15

I tried other products above and over 13 oz, same results (or really lack of) under v1.5.2.
Same results.

Last edit: 3 weeks 5 days ago by jazzmang. Reason: Added debug for under 13oz

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

  • Posts: 85053
  • Thank you received: 13870
  • MODERATOR
3 weeks 4 days ago #370001

Hi,

Thanks for the detailed feedback. I've analyzed the debug logs and found the issue. When specific rate indicators (like "Flat Rate Envelope" or "Single Piece") were selected in the plugin configuration, the plugin was filtering out the rates returned by USPS because the API returns a composite code (e.g., PRIORITY_MAIL-FE) which didn't match our allowed list of base codes (e.g., PRIORITY_MAIL).

I've released version 1.5.3 which fixes this matching logic to correctly identify rates even when they have rate indicators attached. This ensures that all applicable rates, including "Priority Mail - Flat Rate Envelope", will now properly appear in the cart. I also confirmed that "First-Class Mail" continues to work correctly.

Please update to version 1.5.3 and let me know if it resolves the issue.

The following user(s) said Thank You: jazzmang

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

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
3 weeks 4 days ago #370002

FYI, after a fresh install of v1.5.1 on a site that had never had it installed, I found that the Shipping Services label text was missing.



Installing v1.5.2 did not fix it either.

Attachments:

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

Time to create page: 0.126 seconds
Powered by Kunena Forum