Zen Cart Logo
Forums / Addon Shipping Modules / USPS Shipping Module [Support Thread]

USPS Shipping Module [Support Thread]

Sticky

Views: 77,352

Results 121 to 140 of 447
6 Nov 2021, 3:45 PM
#121
vdecals avatar

vdecals

Zen Follower

Join Date:
Jun 2009
Location:
Sparta, TN
Posts:
166
Plugin Contributions:
0

USPS Shipping Module [Support Thread]

lat9:

If I understand your question, you're asking whether the USPS shipping module can create shipping labels for those packages. The answer to that question is "No", it only gathers the quotes from USPS.

As imagined. Thank you Cindy.
... and Scott :)

13 Jan 2022, 12:50 PM
#123
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

split63:

Please see my post here:
https://www.zen-cart.com/showthread.php?228583-USPS-domestic-estimated-shipping-time
... and that post was:
It appears that the USPS domestic shipping times displayed are hard coded. I had thought the time was populated live by USPS based on the source and destination.

inside the USPS.php files is this:
PHP Code:
* Legacy method:

  • Parse the domestic-services transit time results data obtained from special extra API calls

Apparently it did once come from the USPS.....has this been eliminated?
It still does. You need to enable (in the admin's Modules :: Shipping :: USPS) the "Display Transit Time" setting. The transit times are part of the quote response from USPS>

13 Jan 2022, 3:53 PM
#124
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

"Display transit time" is checked.
Below that is this:

USPS Domestic Transit Time Calculation Mode
Select from the following the USPS options.
note: NEW and OLD will add additional time to quotes. CUSTOM allows your custom shipping days.

  • CUSTOM
  • NEW
  • OLD

Does "custom" pull from the hard coded transit time in the php file?
What does "New" and "Old" do?

13 Jan 2022, 4:55 PM
#125
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

split63:

"Display transit time" is checked.
Below that is this:

Does "custom" pull from the hard coded transit time in the php file?
What does "New" and "Old" do?
I don't know (I inherited this plugin a couple of years ago). I've only used "New" which works.

13 Jan 2022, 5:13 PM
#126
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

I tried "Old" for USPS priority, for west coast, east coast and Texas destination ZIP codes, it always listed "5-days"
I tried "New", it was always "2-days".

How does this plug-in know the starting shipping location? Is it pulling it from Menu - Configuration - My Store - Zone? Or is it tied to the "USPS Web Tools User ID"

13 Jan 2022, 5:51 PM
#127
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

It goes off the "Shipping Origin Country", specified in Configuration :: Shipping & Packaging.

13 Jan 2022, 9:23 PM
#128
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

lat9:

It goes off the "Shipping Origin Country", specified in Configuration :: Shipping & Packaging.
Thanks, I had that set to an older ZIP.

Are you seeing the constant value for Transit time when set to "New" or "Old"

This is in the php file:

Options: 'NEW' = <ShipDate>, 'OLD' = extra API calls, 'CUSTOM' = hard-coded
11 Apr 2022, 3:10 AM
#129
willwec avatar

willwec

New Zenner

Join Date:
Jun 2007
Posts:
66
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

I'm posting this here cuz it was suggested.
Zen Cart 1.5.5f
PHP Version 7.4.28
http://trvparts.com/catalog/
Plugins-usps, ups
USPS Version Date
2021-05-05 K11a

USPS has increased their shipping for domestic priority on dimensional (DIM) for things over a certain size . Until now, I pretty much put in the weight and "until now" have been getting accurate shipping price. But now that USPS has changed their rates for certain size packages the module is charging mush less that what price I get through "stamps dot com" when I ship the product. Like I just got a an order for a package that was 1lb-5.4 which was 31x5x1 and my cart charged $13.16 but when I put those numbers in "stamps dot com" it cost me $18.56 to ship it. ***Just increasing the weight of each item will cause WAY to much to be charged via the cart for the item if I'm sending to Canada. ***I'm thinking the fix for this is a dimensional thing in the product description. Maybe there is a plug in or a fix for this already. I have looked for this here in the forums but I have not seen it.

Does anyone know the fix for this???????
I understand the problem.

11 Apr 2022, 11:59 AM
#130
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

willweC:

I'm posting this here cuz it was suggested.
Zen Cart 1.5.5f
PHP Version 7.4.28
http://trvparts.com/catalog/
Plugins-usps, ups
USPS Version Date
2021-05-05 K11a

USPS has increased their shipping for domestic priority on dimensional (DIM) for things over a certain size . Until now, I pretty much put in the weight and "until now" have been getting accurate shipping price. But now that USPS has changed their rates for certain size packages the module is charging mush less that what price I get through "stamps dot com" when I ship the product. Like I just got a an order for a package that was 1lb-5.4 which was 31x5x1 and my cart charged $13.16 but when I put those numbers in "stamps dot com" it cost me $18.56 to ship it. ***Just increasing the weight of each item will cause WAY to much to be charged via the cart for the item if I'm sending to Canada. ***I'm thinking the fix for this is a dimensional thing in the product description. Maybe there is a plug in or a fix for this already. I have looked for this here in the forums but I have not seen it.

Does anyone know the fix for this???????
I understand the problem.
It's one thing if you know that each shipment will be a single box of a given dimension; it's quite another to take a collection of products with dimensions and attempt to determine a box size that will work.

I know of no currently working plugin that will do dimensional shipping.

11 Apr 2022, 1:09 PM
#131
mikestaps avatar

mikestaps

Zen Follower

Join Date:
Aug 2010
Location:
Grand Blanc, MI
Posts:
305
Plugin Contributions:
1

Re: USPS Shipping Module [Support Thread]

willweC:

I'm posting this here cuz it was suggested.
Zen Cart 1.5.5f
PHP Version 7.4.28
http://trvparts.com/catalog/
Plugins-usps, ups
USPS Version Date
2021-05-05 K11a

USPS has increased their shipping for domestic priority on dimensional (DIM) for things over a certain size . Until now, I pretty much put in the weight and "until now" have been getting accurate shipping price. But now that USPS has changed their rates for certain size packages the module is charging mush less that what price I get through "stamps dot com" when I ship the product. Like I just got a an order for a package that was 1lb-5.4 which was 31x5x1 and my cart charged $13.16 but when I put those numbers in "stamps dot com" it cost me $18.56 to ship it. ***Just increasing the weight of each item will cause WAY to much to be charged via the cart for the item if I'm sending to Canada. ***I'm thinking the fix for this is a dimensional thing in the product description. Maybe there is a plug in or a fix for this already. I have looked for this here in the forums but I have not seen it.

Does anyone know the fix for this???????
I understand the problem.

I have been running in to this kind of issue for A LONG time... UPS went totally dimensional a while ago, so our weights are all bumped up to cover that. Using the UPS Worldship program you can see what the "shipping" weight is vs. the actual weight in the detail when you input the package dimensions.

Because of this, when USPS over quotes/charges international we refund the customer the difference. Yes, it is an extra step when shipping, but doing it this way prevents us from having to pay the extra shipping.

20 Apr 2022, 8:29 PM
#132
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
367
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

swguy:

I will periodically see

--> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /SITE/includes/modules/shipping/usps.php on line 492. // line 487 in an unmodified file

where that line is

        $PackageSize = count($uspsQuote['Package']['Service']);  

This is the else branch of $this->is_us_shipment.

Is it possible this branch needs the same check as the other branch, where we check count($uspsQuote['Package']); (line 480).

I noticed the same issues and I spent some time try to fix it. Here is what I found:

How to trigger this warning:

  1. When you tried to ship this order to a country that USPS cannot ship (like Russia), this warning will be generated (because USPS cannot ship to that country).
  2. If your shopping cart is expensive (like over 10k) or maybe very heavy, and your shipping cart has more than one items, if you want to ship it to non-US country (like France), this warning will be generated. It seems USPS doesn't have a way to ship this order so zen cart cannot get a quote from USPS.

Here is my fix. I tested and it seems good. I'm not a professional developer, so if you have a better way to improve, please let me know. My USPS module version is 2020-09-24 lat9 Version K11. I checked the latest version, the code in this section is the same.

Here is the original code near line 487:

        if ($this->is_us_shipment) {
            $PackageSize = count($uspsQuote['Package']);
            // if object has no legitimate children, turn it into a firstborn:
            if (isset($uspsQuote['Package']['ZipDestination']) && !isset($uspsQuote['Package'][0]['Postage'])) {
                $uspsQuote['Package'][] = $uspsQuote['Package'];
                $PackageSize = 1;
            }
        } else {
            $PackageSize = count($uspsQuote['Package']['Service']);
        }

Here is my code:

        if ($this->is_us_shipment) {
            $PackageSize = count($uspsQuote['Package']);
            // if object has no legitimate children, turn it into a firstborn:
            if (isset($uspsQuote['Package']['ZipDestination']) && !isset($uspsQuote['Package'][0]['Postage'])) {
                $uspsQuote['Package'][] = $uspsQuote['Package'];
                $PackageSize = 1;
            }
        } else {
        //    $PackageSize = count($uspsQuote['Package']['Service']);
        if ($uspsQuote['Package']['Service']) {
        $PackageSize = count($uspsQuote['Package']['Service']);
            } 
        }
21 Apr 2022, 11:39 AM
#133
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

Thanks for the reports and the detective work! I've opened a tracking issue for the resolution on the USPS shipping modules GitHub repository: https://github.com/lat9/usps/issues/19

10 Jul 2022, 12:23 PM
#134
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

I posted this in the built in shipping category also, but then realized it probably belonged here.

All of a sudden, customers are seeing only First Class shipping rates (if a package falls within the weight limit for First Class). If it's heavier than that, they're not seeing USPS rates at all. I've had to take the site down for maintenance to avoid people choosing store pickup for everything. It's acting as though the First Class filter was on, but it is not and never has been.

I turned on debug, but the post office appears to be returning the rates for all the checked services. They just aren't being displayed to the customer.

Any ideas? I've had the site down for maintenance for hours now, and I have to get this fixed.

10 Jul 2022, 1:59 PM
#135
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

HeleneWallis:

I posted this in the built in shipping category also, but then realized it probably belonged here.

All of a sudden, customers are seeing only First Class shipping rates (if a package falls within the weight limit for First Class). If it's heavier than that, they're not seeing USPS rates at all. I've had to take the site down for maintenance to avoid people choosing store pickup for everything. It's acting as though the First Class filter was on, but it is not and never has been.

I turned on debug, but the post office appears to be returning the rates for all the checked services. They just aren't being displayed to the customer.

Any ideas? I've had the site down for maintenance for hours now, and I have to get this fixed.
I received the USPS log (thanks @HeleneWallis) and will note that the only methods returned are for versions of "Priority Mail". What methods and associated weights are currently configured for the store?

10 Jul 2022, 2:01 PM
#136
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

lat9:

I received the USPS log (thanks @HeleneWallis) and will note that the only methods returned are for versions of "Priority Mail". What methods and associated weights are currently configured for the store?

All the ones that are showing for Priority Mail, plus First Class and Priority Mail Express. What is really weird, though, is that I'm not getting any log entries now at all. I still have debug turned on, but no log entries are being generated.

The weights would be 15 ounces for First Class, and anything over that would go in one of the Priority Mail classes.

10 Jul 2022, 2:11 PM
#137
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

Edit to above--logs are now showing up again. But as you said, only the Priority rates are being returned, even though First Class is enabled.

One of my customers mentioned that the post office is doing a rate update today. So I guess it's possible that this is actually a PO glitch and not anything in the software.

10 Jul 2022, 4:54 PM
#138
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

The USPS API has done it again; they've changed the branding for the Priority Mail and Priority Mail Express methods from a trademark (TM) to a registered-trademark (RM), which results in a mismatch when the shipping module attempts to locate methods returned.

An update will be available later today or tomorrow. Thanks, @HeleneWallis, for the notification and your help.

10 Jul 2022, 6:23 PM
#139
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

Re: USPS Shipping Module [Support Thread]

lat9:

The USPS API has done it again; they've changed the branding for the Priority Mail and Priority Mail Express methods from a trademark (TM) to a registered-trademark (RM), which results in a mismatch when the shipping module attempts to locate methods returned.

An update will be available later today or tomorrow. Thanks, @HeleneWallis, for the notification and your help.

I am happy to buy a cup of coffee to anyone who can provide an update to fix this issue! Customers are unable to checkout!

10 Jul 2022, 6:28 PM
#140
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: USPS Shipping Module [Support Thread]

I've just submitted 2022-07-10 K11b for the Zen Cart moderators' review; I'll post back here when it's available for download.

This version has changes associated with the following GitHub issues:

#17: Enable "Ground" shipping to be forced.
#19: Correct PHP warning when no quote is returned.
#20: Correct USPS branding change that results in no "Priority Mail" or "Priority Mail Express" methods returned.
#21: Automatically update the configuration if updating from '2021-05-05 K11a'.

Early adopters can download from the module's GitHub repository: https://github.com/lat9/usps/releases/tag/USPS_2022_07_10_K11b