USPS2 Not Providing Rates

  • Posts: 291
  • Thank you received: 26
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
1 month 2 weeks ago #370010

v1.5.3 fixed the issue with the rates not showing.

One discrepancy is that First-Class doesn't get the Rate Indicator Restriction [XX] tagged on at the end

.e.g.
USPS (new under 1oz) First-Class Mail $1.03
USPS (new under 1oz) USPS Ground Advantage - [SP] Single Piece $7.90
USPS (new under 1oz) Priority Mail - [SP] Single Piece $14.20
USPS (new under 1oz) Priority Mail Express - [E4] Priority Mail Express Flat Rate Envelope - Post Office To Addressee $33.40
USPS (new under 1oz) Priority Mail Express - [E6] Priority Mail Express Legal Flat Rate Envelope $33.65
USPS (new under 1oz) Priority Mail Express - [E7] Priority Mail Express Legal Flat Rate Envelope Sunday / Holiday $33.65
USPS (new under 1oz) Priority Mail Express - [PA] Priority Mail Express Single Piece $43.70

Is that overlooked, or is there a reason? I figured it would be [SP] Single Piece like Ground and Priority Mail.

Doing more testing, but it looks promising.

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 2 weeks ago #370014

FYI - testing it on a production site now.

Note that with the "USPS Ground Advantage", the Plugin name gets added to it.

So in the end, we get "USPS USPS Ground Advantage" (with USPS twice).

I tried changing it via Joomla Language Overrides, but it only changes it on the plugin admin side; it still shows up in the cart that way. I couldn't find it in the Configuration -> Language file either. Is there any place to change that?

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

  • Posts: 85201
  • Thank you received: 13909
  • MODERATOR
1 month 2 weeks ago #370016

Hi,

Thanks for the feedback! Glad to hear v1.5.3 fixed the main issue with rates not showing.

Version 1.5.4 Release:
I've just released version 1.5.4 which fixes an issue reported earlier where the shipping service names (Priority Mail, Ground Advantage, etc.) were not displaying on fresh installs - only the raw translation keys were shown. This was due to the language file being loaded too late during plugin initialization.
It also fixes the issue with the USPS text being doubled in some cases.

Regarding First-Class Mail not showing rate indicators: This is by design and there's no need to change it. First-Class Mail uses a simpler pricing structure - there's just one rate based on weight and whether it's a Letter or Flat.

Unlike Priority Mail which has multiple packaging options (Flat Rate Envelope, Small Box, Single Piece, etc.) that customers can choose from at different prices, First-Class letters don't have such variations. That's why USPS doesn't provide rate indicator codes for them in their Letter API response.

So "First-Class Mail $1.03" is the complete and accurate rate - there's no missing information. Adding "[SP] Single Piece" would actually be misleading since USPS doesn't return or even support that distinction for First-Class letters.

Please update to version 1.5.4 and let me know how your testing goes!

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
1 month 2 weeks ago #370023

Quick check of v1.5.4 seems good.

One thing that would be nice is to have a <span></span>around the Rate Indicator Restriction in the checkout's results.

Some of them get quite long and wrap awkwardly, especially for mobile.

Being able to control the presentation in the checkout would help.

I'm not sure if this can be done in checkout/show_block_shipping.php.
I see "<?php echo $shipping->shipping_name;?>" but not sure if there's a way to break shipping_name apart.

I see front-end template options for plugins like hikashopshipping_ups, but nothing for the USPS2 plugin.

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 2 weeks ago #370031

So this is odd.

In v1.5.4, the double USPS in Ground Advantage is gone.

But on a different site with a fresh v1.5.4 install, I'm still seeing the double.



Tried adding an override via Joomla language, but still not getting the double.

Never mind, figured out what you were doing. If I just had the shipping method = "USPS" it removes it.


So far, everything else seems to be working.

Attachments:
Last edit: 1 month 2 weeks ago by jazzmang. Reason: Update

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 1 week ago #370059

A few additional bugs after orders started coming in, which we found when dealing with missing language text.

First is in the administration's Orders area, as just the constant name, not the shipping method value:



On the invoice (for printing) for the order, it is blank instead of either a constant name or a value:


And on the emails going out, it just has the constant name again:


This seems to be mainly with anything OTHER than USPS - First-Class Mail, which shows fine in all 3 locations if that is the method.

Attachments:
Last edit: 1 month 1 week ago by jazzmang. Reason: Noticed this only affects the non-first-class mail method.

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

  • Posts: 85201
  • Thank you received: 13909
  • MODERATOR
1 month 1 week ago #370062

Hi,

I've released a new version of the plugin which should fix that. Please update the plugin.

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
1 month 1 week ago #370082

The orders coming in look good so far under v1.5.5.

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 1 week ago #370106

There may be an issue with the "Thickness" value being submitted for LETTERS and FLATS.

A product has 1.25 x 0.563 x 0.25 (LxWxH) at 1oz and by itself returns fine.

But when 2x+ of that same product is submitted, I can see in the debug that the thickness used by USPS is set to the width (.563) rather than the height (.25 x 2 = .5), which is really the true thickness.

Not sure if that is USPS flipping it on its own or something the plug-in does upon submission.

But that doesn't seem right and will likely cause problems.

Is the plugin taking the shortest of width or height and submitting that as thickness?

I could swear during testing last week it the product height was used for thickness, and adding them together, i.e., 0.25 x3 = 0.75

Results for 1 product (.501 oz added for packaging via plugin) where it uses .25 for the thickness.

<pre>Array
(
    [weight] => 1.501
    [length] => 5
    [height] => 3.5
    [thickness] => 0.25
    [processingCategory] => LETTERS
)
</pre>

Results for 2 products (.91 added for flats packaging in plugin), but now it is using the .563 for thickness (I think it should be .5)
<pre>Array
(
    [weight] => 3.91
    [length] => 11.5
    [height] => 6
    [thickness] => 0.563
    [processingCategory] => FLATS
)
</pre>

Results for 3 products (not that thickness isn't used anymore in the results, but width of a single product is used as height now:
<pre>Array
(
    [weight] => 0.244375
    [length] => 1.25
    [width] => 1
    [height] => 0.563
    [originZIPCode] => 21813
    [destinationZIPCode] => 66503
    [priceType] => RETAIL
    [mailClasses] => Array
        (
            [0] => ALL
        )

)
</pre>

Last edit: 1 month 1 week ago by jazzmang.

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

  • Posts: 85201
  • Thank you received: 13909
  • MODERATOR
1 month 1 week ago #370107

Hi,

Thanks for reporting this issue with the thickness calculation! You were absolutely right, there was a bug affecting how thickness was calculated when stacking multiple flat items.

When you had multiple quantities of a flat item (like your 1.25" × 0.563" × 0.25" product), the plugin was incorrectly calculating the thickness for quantities of 3 or more. This happened because the core HikaShop stacking logic correctly accumulates the smallest dimension (0.25") when stacking items but the USPS2 plugin was then re-sorting all dimensions, which caused the accumulated thickness to swap positions with another dimension when it grew larger.
Version 1.5.6 now preserves the stacking dimension as "thickness" before any re-sorting occurs. This ensures that the Letter/Flats API receives the correct accumulated thickness regardless of how many items are stacked.
Please update to version 1.5.6 and the thickness will now correctly reflect the stacked height of your items:
1 item: 0.25"
2 items: 0.50"
3 items: 0.75"
4 items: 1.00"

The following user(s) said Thank You: jazzmang

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

Time to create page: 0.072 seconds
Powered by Kunena Forum