Forums / Addon Shipping Modules / USPS Shipping (RESTful) (USPSr)

USPS Shipping (RESTful) (USPSr)

Sticky

Views: 54,964

Results 441 to 460 of 558
18 Feb 2026, 2:55 AM
#441
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,848
Plugin Contributions:
17

USPS Shipping (RESTful) (USPSr)

<respectfulRant> Those changes are for releases after 2.0.0.

If your release is not ready for 2.0.0, it should not advertise as such.

The very first part of your readme.html states that the Module Version will work for 1.5.5 and up. Later, we find that Encapsulated does not work with 2.0.0 even though it uses the plugin manager.

Perhaps you need to break things up and provide two separate mods, while being explicit about which versions they will work with.

I can understand the glitches. Pobody's Nerfect. Still, I shudder to think of the frustration that some store owners are going through.

I've yet to have an install that wasn't a problem. In the case of the 2.0.0 sites, I went with non-encapsulated for both sites, and they are working.

That being the case, why would the encapsulated not even load without core file adjustments?

And those "after 2.0.0" adjustments should be an explicit "in-your-face" part of the installation files, especially involving core file updates.

I have previous encapsulated versions working on 2.1.0 and 2.2.0.

I hope you can understand my hesitation to update/load/change anything, with one of our customers having a USPS truck show up daily.

Maybe when the dust settles, I can setup test sites.

</respectfulRant>

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

18 Feb 2026, 3:04 AM
#442
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

Please accept my apologies about that. It was obviously not my intention to make complicated in anyway shape or form with the regards to earlier installations. I originally did release the module as both encapsulated and traditional but submitting both into the module database was a bit cumbersome and thus I merged everything into one install.

Going forward, I'll just go ahead and suggest that 2.0.x only use the traditional method of module installation which is just uploading into the root directory of the ZenCart module and leave that 2.1.0 be compatible with both methods. I have no idea why the module is not working with the core file adjustments but that is above me to work out. Nonetheless, I recommend removing the module as a whole and using the non-encapsulated version as available from the same module directory by copying only the admin/ and includes/ directory from the Zip File and move forward from there.

18 Feb 2026, 11:48 PM
#443
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

dbltoe:

<respectfulRant> That being the case, why would the encapsulated not even load without core file adjustments? </respectfulRant>

I completely failed to address this.

In 2.0.0 and 2.0.1 per the gist that lat9 provided, the zc_plugins directory and module manager, is NOT inherently made for front facing modules like payment, shipping, or order-totals. They were primarily for back end only modules like POSM. USPS Restful is NOT a back end only module, it's a front facing shipping module (even though it has an admin directory, it's primarily front-facing as it mainly deals with the shipping area.)

That's why I placed the disclaimer that ZC 2.0.0 and ZC 2.0.1 would work with the module as encapsulated but only if those core file changes were made from 2.1.0 or from the gist that I linked previously.

As of now, I have since removed the notes and instructions from the module's readme/wiki and going forward the module will no longer be advertised as being 2.0.x encapsulated safe. Instead, the module's instructions will advise to use the encapsulated install only if you're on 2.1.0 or higher. (If a savvy person wants to make the changes, they're welcome to do so.)

Additionally, I'm also working a way to do a "purge" script. That script will let people undo the "oh, I copied everything and now nothing is working" because it wasn't originally clear before I wrote the "README_1st.md" file not to copy everything. That purge will:

  • delete the USPSRestful directory out of /zc_plugins
  • delete any keys from the module
  • delete any of the individual files out of the traditional spaces that were packed along with it.

Pretty much removing everything, except the USPS logo file, and letting the site owner try again.

That purge script won't be a part of the forthcoming 1.8.0 release but maybe released on its own later.

19 Feb 2026, 4:42 AM
#444
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

**New Version Incoming!

Added in 1.8.0**

  • Added an uninstall script for traditional installs of the module. This uninstaller will be available in the Tools menu, but can also be accessed by accessing ?cmd=uspsr_uninstall in the admin area. This script will remove all files that you uploaded from the zip file (minus the USPS logo file), delete the entries in the configuration table, and self-delete the installer. This will only work if the module detects that it was not installed via encapsulation. [#61]

  • Created a "Purge" script that will completely uninstall all parts of the module. It will remove files in the traditional install and the encapsulated install while removing any configuration keys related to the module. (I got annoyed when people were just copying the entire folder into the ZenCarts and then complaining about the white screens and error messages they would receive because of the conflicts.) The script will NOT be included in any release and can only be obtained from the GitHub repository. [#114]
    **
    Fixed in 1.8.0**

  • Fixed a minor formatting issue that resulted in some HTML entities being logged as part of the debug log.

  • Clarified the encapsulated uninstaller to look specifically for a file named uspsr.php. (Not uspsr(some character).php).

  • Fixed an issue (again) with the display of Priority Mail rates that were being hidden because of an uncaught Machinable/Nonstandard flag. This should work as necessary. This might pop up in other services, will keep an eye on it. [#109]

  • Fixed an issue that allowed a shop owner to effectively send out zero weight carts. The module will now not send a quote request unless at least ONE item has a non-zero weight to it. [#108]

=================

A note about the uninstaller mentioned, it is only accessible from traditional installs. (If you attempt to run it from the Encapsulated install, you will get kicked back to the admin dashboard and displayed an error message.

Now available on GitHub and will be submitted to the Plugin Directory soon.

20 Feb 2026, 12:38 AM
#445
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,444
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

Hello, I have a customer that continues on ZCv1.5.6 and PHP5.6. I tried the "Converted" version for php5.6 but even though we don't get errors, the option for USPS doesn't come up on the cart.

The customer haven't upgraded because she's closing the store this year, so she finds it not worth it. Is there anything I can do to make this work?

IDEASLady
IDEAS Creative Studio

Your image... our business!

20 Feb 2026, 12:40 AM
#446
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

ideasgirl:

Hello, I have a customer that continues on ZCv1.5.6 and PHP5.6. I tried the "Converted" version for php5.6 but even though we don't get errors, the option for USPS doesn't come up on the cart.

The customer haven't upgraded because she's closing the store this year, so she finds it not worth it. Is there anything I can do to make this work?

I would have to backport the code down to PHP 5.6. I'm not even sure I have a valid way of testing it locally to ZC1.5.6 as of right now. I can try to work with the 1.8.0 but at this rate, I might insist that you try to get up to at least PHP 7 instead.

I don't even have a full build of 1.5.6 currently, but I'll see what I can do.

20 Feb 2026, 1:01 AM
#447
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,444
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

I just tried, and the cart broke when clicked "checkout" and I think it has to do with the FedEx shipping module. Well, I tried 7.2 and 7.4 (I don't have 7.0 available).

IDEASLady
IDEAS Creative Studio

Your image... our business!

20 Feb 2026, 1:03 AM
#448
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

ideasgirl:

I just tried, and the cart broke when clicked "checkout" and I think it has to do with the FedEx shipping module. Well, I tried 7.2 and 7.4 (I don't have 7.0 available).

Can you try temporarily disabling the FedEx module or sending me any of the logs to my DMs?

20 Feb 2026, 1:05 AM
#449
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,444
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

I can definitely try

IDEASLady
IDEAS Creative Studio

Your image... our business!

20 Feb 2026, 1:07 AM
#450
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

ideasgirl:

I can definitely try

So, the USPSRestful definitely works on PHP 7.3 and ZC 1.5.6a. (That's the version I test with.)

21 Feb 2026, 1:26 PM
#451
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

Minor bugfix pass submitted. (Changes were submitted as an omnibus combine to the Plugin Directory.)

Fixed in 1.8.1

  • Improved the uninstall script (?cmd=uspsr_uninstall) and purge (?cmd=uspsr_purge) scripts to run in the backend via either a link in the menu (traditional only) or direct access in the backend (traditional and encapsulated). This script is SEVERELY powerful. You MUST confirm that you want to run this script. (Which was noticebly absent on the first launch.) The "extras" folder version will still be available for advanced users and will not be included in the ZenCart Plugins Database release. (Will still be available on the GitHub repository.)
  • Fixed the weight checking algorithm that was introduced in 1.8.0. Older versions of ZenCart only have the $order->products[$x]['weight'] field instead of $order->products[$x]['products_weight'] that was being used. This caused an issue in earlier versions of ZenCart that didn't have that value set and thus was zero'd out which would mean the module has a zero weight.
  • Fixed a type-casting bug for product type check. (=== 1 vs. == 1 in short.) Also added a check for Gift Certificates to disqualify it from insurable value calculations.

These changes were posted to the GitHub and were submitted to the Plugins Directory as well.

23 Feb 2026, 2:29 PM
#452
helenewallis avatar

helenewallis

Totally Zenned

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

Re: USPS Shipping (RESTful) (USPSr)

Is anyone else still getting nag emails from the USPS that the old system will be discontinued on January 26, even after they have switched to the USPSr? I'm no longer able to manage the code, but one of the other owners did make the switch and we're still getting messages that the old system is going away.

One other question, I know the official class descriptions (i.e. 'Priority MailRM') have changed--I think it was TM at first, and then changed to RM. Has there been another change? I very carefully excluded some of our products from being shipped in inappropriate classes years ago, and now all of a sudden people are being allowed to specify those classes again. I've checked the exclusions and they are still there and should still be keeping people from shipping something in a small flat rate box that won't fit in one, just for example. But suddenly, since we changed to the USPSr module, some of those exclusions no longer work.

23 Feb 2026, 3:10 PM
#453
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

HeleneWallis:

Is anyone else still getting nag emails from the USPS that the old system will be discontinued on January 26, even after they have switched to the USPSr? I'm no longer able to manage the code, but one of the other owners did make the switch and we're still getting messages that the old system is going away.

You're probably still going to get those email messages even if you transferred up. WebTools didn't tie into a USPS.com account so the two systems have no way of knowing whether or not you've moved up to the USPS API. Like I obviously moved on to USPS APIs but still get them. The US Postal Service knows there are people out there that haven't (or refuse to) move on to USPS API and thus they keep using them. Best to ignore them for the time being. (I don't even see an unsubscribe message.)

HeleneWallis:

One other question, I know the official class descriptions (i.e. 'Priority MailRM') have changed--I think it was TM at first, and then changed to RM. Has there been another change?

That's covered by the FAQ, but broadly: I didn't put them in because they weren't explicitly output by the USPS API returns. I could go back and add them if it's really necessary but it's tricky putting the (R) and TM exactly where they are supposed to. So I didn't even try.

HeleneWallis:

I very carefully excluded some of our products from being shipped in inappropriate classes years ago, and now all of a sudden people are being allowed to specify those classes again. I've checked the exclusions and they are still there and should still be keeping people from shipping something in a small flat rate box that won't fit in one, just for example. But suddenly, since we changed to the USPSr module, some of those exclusions no longer work.

My question is how were you excluding them? Did you use an Observer? You may have to rewrite your code to match the new handles. If you were searching for the name of the service with the TM and RM, you should drop those. The Observer hook points are still the same, but the data going into them are different.

23 Feb 2026, 3:42 PM
#454
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: USPS Shipping (RESTful) (USPSr)

Is anyone else still getting nag emails from the USPS that the old system will be discontinued on January 26?

Yep. Constantly.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

23 Feb 2026, 6:26 PM
#455
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,848
Plugin Contributions:
17

Re: USPS Shipping (RESTful) (USPSr)

swguy:

Is anyone else still getting nag emails from the USPS that the old system will be discontinued on January 26?

Yep. Constantly.
Had a customer who was very upset that their USPS was "not working" and wanted an explanation as to why they were not getting what they paid for. They've been on R for 11 months.:dontgetit

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

24 Feb 2026, 2:19 PM
#456
helenewallis avatar

helenewallis

Totally Zenned

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

Re: USPS Shipping (RESTful) (USPSr)

My question is how were you excluding them? Did you use an Observer? You may have to rewrite your code to match the new handles. If you were searching for the name of the service with the TM and RM, you should drop those. The Observer hook points are still the same, but the data going into them are different.

Yes, using an observer. I'll try taking out the TM and RM.

24 Feb 2026, 2:20 PM
#457
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

HeleneWallis:

Yes, using an observer. I'll try taking out the TM and RM.

In particular what services of the USPS are you targeting? There's a certain way it gets output from the API.

24 Feb 2026, 5:27 PM
#458
njcyx avatar

njcyx

Zen Follower

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

Re: USPS Shipping (RESTful) (USPSr)

Zc 2.1.0
USPSR EPS. Here is what I did to upgrade my plug-in from v1.7.0 to v1.8.1.

I uploaded all the files to server to overwrite all the old files at first (USPSr module was enabled at that moment), then went to plug-in manager, then clicked "Upgrade button" there. Then it shown a white screen. Here is the log file:

PHP Fatal error: Cannot redeclare zen_draw_label() (previously declared in /zc_plugins/USPSRestful/v1.8.1/admin/includes/functions/extra_functions/usps.extra_functions.php:67) in /admin/includes/functions/html_output.php on line 577

Request URI: /admin/index.php?cmd=plugin_manager&page=1&colKey=USPSRestful, IP address: xxxx
--> PHP Fatal error: Cannot redeclare zen_draw_label() (previously declared in /zc_plugins/USPSRestful/v1.8.1/admin/includes/functions/extra_functions/usps.extra_functions.php:67) in /admin/includes/functions/html_output.php on line 577.

Not sure if it is only me...

For non-EPS module, I just overwrote all the old files. It works with no issues.

24 Feb 2026, 5:32 PM
#459
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

njcyx:

Zc 2.1.0
USPSR EPS. Here is what I did to upgrade my plug-in from v1.7.0 to v1.8.1.

I uploaded all the files to server to overwrite all the old files at first (USPSr module was enabled at that moment), then went to plug-in manager, then clicked "Upgrade button" there. Then it shown a white screen. Here is the log file:

PHP Fatal error: Cannot redeclare zen_draw_label() (previously declared in /zc_plugins/USPSRestful/v1.8.1/admin/includes/functions/extra_functions/usps.extra_functions.php:67) in /admin/includes/functions/html_output.php on line 577

Request URI: /admin/index.php?cmd=plugin_manager&page=1&colKey=USPSRestful, IP address: xxxx
--> PHP Fatal error: Cannot redeclare zen_draw_label() (previously declared in /zc_plugins/USPSRestful/v1.8.1/admin/includes/functions/extra_functions/usps.extra_functions.php:67) in /admin/includes/functions/html_output.php on line 577.

Not sure if it is only me...

For non-EPS module, I just overwrote all the old files. It works with no issues.

Wait you overrode 1.7.0 with the 1.8.1 files? Or you uploaded the 1.8.1 files in to the separate directory and tried to hit upgrade?

24 Feb 2026, 5:40 PM
#460
njcyx avatar

njcyx

Zen Follower

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

Re: USPS Shipping (RESTful) (USPSr)

Ok. I just uploaded all the new files to the server. It looks like under the folder /zc_plugins/USPSRestful, there are two folders. One is v1.7.0, another is v1.8.1. So it doesn't overwrite the old files...

I commented out the bottom section in usps.extra_functions.php and it worked. My PHP version is 8.2