♥Smoky Barnable Posted August 29, 2022 Share Posted August 29, 2022 I have this working on PHP8 but occasionally see a fatal error in my logs? if (is_countable($uspsQuote) && count($uspsQuote) > 0) { $PackageSize = ($order->delivery['country']['iso_code_2'] == 'US' ? sizeof($uspsQuote['Package']) : sizeof($uspsQuote['Package']['Service'])); The error is: PHP Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, null given Quote The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence. - Rabindranath Tagore Link to comment Share on other sites More sharing options...
OldPete Posted November 25, 2022 Share Posted November 25, 2022 (edited) For some reason my USPS module has stopped working... Stupid question that I simply can't remember: Where (which file) does the USPS generated password for the api get entered? When I go to the module settings there's a spot for the user id, but I can't seem to find one for the password (is there even a place?). This is the usps.php file being used: USPS Rate V4 Intl Rate V2 - ver R3.3 $Mod: Changed from Parcel Post to Standard Post 20130129 Kymation $ $Mod: USPS API changes 20130729 Kymation v 1.3 $ $Mod: USPS API changes 20140310 a.forever $ $Mod: USPS API changes 20140802 a.forever $ Copyright (c) 2012 osCbyJetta Released under the GNU General Public License I looked to add a newer (?) version but the download section seems down (?). (I go here: https://app.oscommerce.com/usps and I don't see a place to download anything?) thebestcandles.com is the domain. Any help? Thanks, Pete Edited November 25, 2022 by OldPete Quote Link to comment Share on other sites More sharing options...
bonbec Posted November 25, 2022 Share Posted November 25, 2022 Hello, I don't use USPS but the addons for old OsCommerce are here now : https://old.oscommerce.com/q=usps Quote with OsC 2.2 since 2006 ... Link to comment Share on other sites More sharing options...
♥Smoky Barnable Posted June 3, 2023 Share Posted June 3, 2023 USPS will be changing First class package and ground services to USPS Ground Advantage July 9th. I'm sure some tweaks to the code will be needed to display rates properly. Quote The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence. - Rabindranath Tagore Link to comment Share on other sites More sharing options...
bibleman Posted June 23, 2023 Share Posted June 23, 2023 I am now getting an error on my site: https://www.ministryhelps.com/ When ever I add a product to the cart and then go to check quotes for shipping... or to checkout... it hangs and just spins and goes no further. I am wondering if something has changed in the USPS module? I have osCommerce Online Merchant v2.3.4 at https://www.ministryhelps.com My Shipping package is: USPS Methods Rates V4 Intl Rates V2 v3.6 I checked my logs and I saw this error: 2023-06-23 16:18:10 Warning 47.37.194.4 mod_fcgid: read data timeout in 300 seconds, referer: https://www.ministryhelps.com/shopping_cart.phpApache error 2023-06-23 16:18:10 Error 47.37.194.4 End of script output before headers: shipping_quotes.php, referer: https://www.ministryhelps.com/shopping_cart.phpApache error Got any suggestions on what might be wrong? Thanks Leon Quote I'm having a great Day - hope you are too! Leon Link to comment Share on other sites More sharing options...
ozEworks Support Posted June 23, 2023 Share Posted June 23, 2023 The reported change is just a name change which does not occur until 9 July on the live api (earlier on test). Your error does not sound like a result of this change. When you say ‘go to check quotes’ are you referring to a shipping estimator Add On on your cart page? If so what happens on actual checkout? Have you tried setting USOS module to false (turn off) to confirm it is this module triggering that error? Quote osCommerce Official Partner www.ozEworks.com Link to comment Share on other sites More sharing options...
bibleman Posted June 23, 2023 Share Posted June 23, 2023 53 minutes ago, ozEworks Support said: The reported change is just a name change which does not occur until 9 July on the live api (earlier on test). Your error does not sound like a result of this change. When you say ‘go to check quotes’ are you referring to a shipping estimator Add On on your cart page? If so what happens on actual checkout? Have you tried setting USOS module to false (turn off) to confirm it is this module triggering that error? OK thanks for responding. Here is what I have: UPS and the USPS modules. I went into the admin and: Set both of them to false: It would let me go through the checkout process. Set ONLY USPS to false: Hangs usp and renders no quotes and will NOT go into the checkout process. Set ONLY UPS to false: It renders quotes and allows you to check out. So seems that it is some kind of conflict with the UPS module. (Which on that site we use very little.) So present status of the site is WORKS as it should (so long as I keep UPS disabled.) Thanks, thanks, thanks, for the suggestion. But it is an old site and I am wanting to update it anyway, so may just run it as it is until I are YOU update it to the Oscommerce V4. Thanks Leon PS - I have an email sent to your site about the upgrade. Quote I'm having a great Day - hope you are too! Leon Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 24, 2023 Share Posted June 24, 2023 3 hours ago, bibleman said: Set ONLY UPS to false: It renders quotes and allows you to check out. Yes, that module is the problem. See this thread for details. ozEworks Support 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
ozEworks Support Posted June 24, 2023 Share Posted June 24, 2023 Odd your UPS module is suddenly causing you issues. It does point to environmental change in regard to hosting. But because it is a tineout could be an issue on UPS side. Their software going on strike? 🫢Regardless pursue the issue on the other thread Jack gave. Quote osCommerce Official Partner www.ozEworks.com Link to comment Share on other sites More sharing options...
otgrouch Posted June 24, 2023 Share Posted June 24, 2023 5 hours ago, bibleman said: OK thanks for responding. Here is what I have: UPS and the USPS modules. I went into the admin and: Set both of them to false: It would let me go through the checkout process. Set ONLY USPS to false: Hangs usp and renders no quotes and will NOT go into the checkout process. Set ONLY UPS to false: It renders quotes and allows you to check out. So seems that it is some kind of conflict with the UPS module. (Which on that site we use very little.) So present status of the site is WORKS as it should (so long as I keep UPS disabled.) Thanks, thanks, thanks, for the suggestion. But it is an old site and I am wanting to update it anyway, so may just run it as it is until I are YOU update it to the Oscommerce V4. Thanks Leon PS - I have an email sent to your site about the upgrade. UPS has stopped supporting their XML. That module locked up our site earlier this week roo Quote Link to comment Share on other sites More sharing options...
ozEworks Support Posted June 24, 2023 Share Posted June 24, 2023 You need to post about UPS issues on the link Jack gave. This topicc is for USPS. Quote osCommerce Official Partner www.ozEworks.com Link to comment Share on other sites More sharing options...
♥Smoky Barnable Posted July 10, 2023 Share Posted July 10, 2023 For those who still want to display first class package rates, the following changes are needed as of today. Change: if( preg_match( '#First\-Class#', $request_type ) && $this->usps_weight < 16/16 ) to: if( preg_match( '#USPS Ground AdvantageTM#', $request_type ) && $this->usps_weight < 16/16 ) Change: \'First-ClassTM Package Service\', to: \'USPS Ground AdvantageTM\', And update in configuration_key MODULE_SHIPPING_USPS_TYPES in the configuration table in the database as well. Quote The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence. - Rabindranath Tagore Link to comment Share on other sites More sharing options...
ozEworks Support Posted July 10, 2023 Share Posted July 10, 2023 Thanks Quote osCommerce Official Partner www.ozEworks.com Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 10, 2023 Share Posted July 10, 2023 I think the Quote USPS Ground AdvantageTM should be Quote USPS Ground AdvantageRM Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
shopgrl Posted July 11, 2023 Share Posted July 11, 2023 My website uses the USPS Shipping Module and every time USPS makes a change, the shipping module works, but leaves off some categories. Now it will not show First Class or Ground. I know about the Global Advantage change and my IT guy has implemented the changes in the code, but the module still is only showing USPS Priority and Priority Express. Is there a way to get the correct coding for that module that actually works? I just need to have the new Global Advantage category to show. Quote Link to comment Share on other sites More sharing options...
otgrouch Posted July 11, 2023 Share Posted July 11, 2023 After you change the code you have to uninstall and reinstall the module. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 11, 2023 Share Posted July 11, 2023 10 minutes ago, otgrouch said: After you change the code you have to uninstall and reinstall the module The module should be removed before the changes are applied, not after. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
shopgrl Posted July 11, 2023 Share Posted July 11, 2023 1 hour ago, shopgrl said: My website uses the USPS Shipping Module and every time USPS makes a change, the shipping module works, but leaves off some categories. Now it will not show First Class or Ground. I know about the Global Advantage change and my IT guy has implemented the changes in the code, but the module still is only showing USPS Priority and Priority Express. Is there a way to get the correct coding for that module that actually works? I just need to have the new Global Advantage category to show. Quote My IT guy takes care of all this. He is in London, so probably won't get back to me until tomorrow. I will let you know if he uninstalled and reinstalled the module, but I think he does, since he has done this kind of adjustment before. I have the usps.php file if anyone wants to take a look. Quote Link to comment Share on other sites More sharing options...
zitt Posted July 11, 2023 Share Posted July 11, 2023 Does anyone have a good download link for the older versions of this module? The link http://addons.oscommerce.com/info/8327 is no longer valid given the move to Oscom v4.0. I need something for 2.3.4 IIRC. I don't understand why the old link can't continue to work. Seems like a consipricy to have us move to a new platform... Quote Link to comment Share on other sites More sharing options...
ozEworks Support Posted July 11, 2023 Share Posted July 11, 2023 https://old.oscommerce.com zitt 1 Quote osCommerce Official Partner www.ozEworks.com Link to comment Share on other sites More sharing options...
ozEworks Support Posted July 11, 2023 Share Posted July 11, 2023 It was our opinion based on what USPS said no code changes would be required. I am just going thru various USPS modules our clients use. The module that is noted as Quote /* $Id: usps.php 5.2.1 - 2.2. RC2a and 2.3 compatible; php 5.3 compatible +++++ Original contribution by Brad Waite and Fritz Clapp ++++ ++++ Revisions and Modifications made by Greg Deeth, 2008 ++++ Copyright 2008 osCommerce Released under the GNU General Public License //VERSION: 5.2.1 Updated to July 28 2013 Changes */ is working fine It sends first class but returns USPS Ground Advantage as promised by USPS. Will look at others. Quote osCommerce Official Partner www.ozEworks.com Link to comment Share on other sites More sharing options...
shopgrl Posted July 11, 2023 Share Posted July 11, 2023 My IT guy says he did uninstall and reinstall the module. This is the version he is using: /* USPS Rate V4 Intl Rate V2 $Mod: Changed from Parcel Post to Standard Post 20130129 Kymation $ $Mod: USPS API changes 20130729 Kymation v 1.3 $ $Mod: USPS API changes 20140310 a.forever $ $Mod: USPS API changes 20140802 a.forever $ $Mod: USPS API changes 20140823 Kymation v 1.4 $ $Mod: USPS API changes 20140907 Kymation & a.forever v 1.5 $ Copyright (c) 2012 osCbyJetta Released under the GNU General Public License */ Would you like me to upload the usps.php file he is using? Quote Link to comment Share on other sites More sharing options...
shopgrl Posted July 11, 2023 Share Posted July 11, 2023 My site (www.jeanniescottage.com) still produces a shipping option of USPS Priority Mail or Express Mail, but has stopped offering the First Class option. So far the tweaks to the module have not been successful. Quote Link to comment Share on other sites More sharing options...
ozEworks Support Posted July 11, 2023 Share Posted July 11, 2023 To point out the obvious, you are paying this person. They should know how to fix. But tell them to check for duplicate entires in the configuration table. If that does not work, ask them to seek direct help here. Quote osCommerce Official Partner www.ozEworks.com Link to comment Share on other sites More sharing options...
TomB01 Posted July 12, 2023 Share Posted July 12, 2023 (edited) On 7/10/2023 at 11:33 AM, Jack_mcs said: I think the should be Mine works with TM and the changes recommended by Smoky Barnacle above. BTW, if you edit the database "configuration" table directly to change the 1st Class Package string to USPS Ground AdvantageTM in the Types field, you don't have to do all the ridiculously tedious uninstall and re-install of the USPS shipping module. That's all the uninstall and re-install do, btw - is populate the correct values in the database to match the strings in the usps php file. Edited July 12, 2023 by TomB01 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.