New Zenner
- Join Date:
- Sep 2017
- Location:
- Raleigh, NC, United States
- Posts:
- 81
- Plugin Contributions:
- 0
USPS Shipping Module [Support Thread]
I turned debug on in the module and did not get any new logs generated in my /logs in my store
Views: 77,355
New Zenner
I turned debug on in the module and did not get any new logs generated in my /logs in my store
New Zenner
Here were some logs around the time of the issues earlier though - not sure why UPS is showing up when I'm not using that module
[13-Feb-2023 22:49:47 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; usps has a deprecated constructor in /home3/tlal/public_html/store/includes/modules/shipping/usps.php on line 16
[13-Feb-2023 22:49:54 UTC] Request URI: /store/index.php?main_page=checkout_shipping, IP address: ##.##.##.##
#1 each() called at [/home3/tlal/public_html/store/includes/modules/shipping/usps.php:391]
#2 usps->_getQuote() called at [/home3/tlal/public_html/store/includes/modules/shipping/usps.php:184]
#3 usps->quote() called at [/home3/tlal/public_html/store/includes/classes/shipping.php:174]
#4 shipping->quote() called at [/home3/tlal/public_html/store/includes/modules/pages/checkout_shipping/header_php.php:184]
#5 require(/home3/tlal/public_html/store/includes/modules/pages/checkout_shipping/header_php.php) called at [/home3/tlal/public_html/store/index.php:35]
--> PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home3/tlal/public_html/store/includes/modules/shipping/usps.php on line 391.
[13-Feb-2023 22:39:34 UTC] Request URI: /store/zcadmin/index.php?cmd=modules&set=shipping&module=usps, IP address: ##.##.##.##
#1 ups->ups() called at [/home3/tlal/public_html/store/zcadmin/modules.php:204]
#2 require(/home3/tlal/public_html/store/zcadmin/modules.php) called at [/home3/tlal/public_html/store/zcadmin/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_SHIPPING_UPS_SORT_ORDER - assumed 'MODULE_SHIPPING_UPS_SORT_ORDER' (this will throw an Error in a future version of PHP) in /home3/tlal/public_html/store/includes/modules/shipping/ups.php on line 61.
[13-Feb-2023 22:39:34 UTC] Request URI: /store/zcadmin/index.php?cmd=modules&set=shipping&module=usps, IP address: ##.##.##.##
#1 ups->ups() called at [/home3/tlal/public_html/store/zcadmin/modules.php:204]
#2 require(/home3/tlal/public_html/store/zcadmin/modules.php) called at [/home3/tlal/public_html/store/zcadmin/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_SHIPPING_UPS_TAX_CLASS - assumed 'MODULE_SHIPPING_UPS_TAX_CLASS' (this will throw an Error in a future version of PHP) in /home3/tlal/public_html/store/includes/modules/shipping/ups.php on line 63.
[13-Feb-2023 22:39:34 UTC] Request URI: /store/zcadmin/index.php?cmd=modules&set=shipping&module=usps, IP address: ##.##.##.##
#1 ups->ups() called at [/home3/tlal/public_html/store/zcadmin/modules.php:204]
#2 require(/home3/tlal/public_html/store/zcadmin/modules.php) called at [/home3/tlal/public_html/store/zcadmin/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_SHIPPING_UPS_TAX_BASIS - assumed 'MODULE_SHIPPING_UPS_TAX_BASIS' (this will throw an Error in a future version of PHP) in /home3/tlal/public_html/store/includes/modules/shipping/ups.php on line 64.
[13-Feb-2023 22:39:34 UTC] Request URI: /store/zcadmin/index.php?cmd=modules&set=shipping&module=usps, IP address: ##.##.##.##
#1 ups->ups() called at [/home3/tlal/public_html/store/zcadmin/modules.php:204]
#2 require(/home3/tlal/public_html/store/zcadmin/modules.php) called at [/home3/tlal/public_html/store/zcadmin/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_SHIPPING_UPS_STATUS - assumed 'MODULE_SHIPPING_UPS_STATUS' (this will throw an Error in a future version of PHP) in /home3/tlal/public_html/store/includes/modules/shipping/ups.php on line 68.
New Zenner
I removed the old UPS module I had in there since I don't ship that service.
New Zenner
2021-05-05 K11a sort of works. I used media mail as a test and it worked fine. Then I added priority mail and first class and the weight would make first class not show up but priority doesn't. Going to up-rev it until I get something working better I guess.
New Zenner
Sorry for so many posts. A, C and I'm staying on E works. F and G both give me the 500 error.
Administrator
wcbutler:
Here were some logs around the time of the issues earlier though - not sure why UPS is showing up when I'm not using that module
[13-Feb-2023 22:49:47 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; usps has a deprecated constructor in /home3/tlal/public_html/store/includes/modules/shipping/usps.php on line 16
[13-Feb-2023 22:49:54 UTC] Request URI: /store/index.php?main_page=checkout_shipping, IP address: ##.##.##.##
#1 each() called at [/home3/tlal/public_html/store/includes/modules/shipping/usps.php:391]
#2 usps->_getQuote() called at [/home3/tlal/public_html/store/includes/modules/shipping/usps.php:184]
#3 usps->quote() called at [/home3/tlal/public_html/store/includes/classes/shipping.php:174]
#4 shipping->quote() called at [/home3/tlal/public_html/store/includes/modules/pages/checkout_shipping/header_php.php:184]
#5 require(/home3/tlal/public_html/store/includes/modules/pages/checkout_shipping/header_php.php) called at [/home3/tlal/public_html/store/index.php:35]
--> PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home3/tlal/public_html/store/includes/modules/shipping/usps.php on line 391....
I have no idea what version of USPS you're using here, but the now-current version (K11g) has no such usage.
Administrator
wcbutler:
Sorry for so many posts. A, C and I'm staying on E works. F and G both give me the 500 error.
If you've got a "Server 500" error, there's a log waiting patiently for you to read in the site's /logs sub-directory. Without knowing what the error is, it's like shooting in the dark.
Administrator
2023-02-14 K11h is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1292
I thought I'd released this a week ago, but the corrections here are most likely the source of the "Server 500" error posted by @wcbutler.
This version corrects the following GitHub issues:
#32: USPS 'cheapest' quotes aren't selected; quotes need to be public.
#31: K11g won't auto-update from K11f
New Zenner
K11h fixed the issue I was having (here: https://www.zen-cart.com/showthread.php?229302-USPS-shipping-module-has-rendered-checkout-inoperable ), so thank you!
Is it safe to doctor the usps.php file to disable media mail for certain product categories? That was what started my issue last night. I have done this with prior versions of the file but don't want to mess with it if it will break, obviously.
New Zenner
dalecooper:
K11h fixed the issue I was having (here: https://www.zen-cart.com/showthread.php?229302-USPS-shipping-module-has-rendered-checkout-inoperable ), so thank you!
Is it safe to doctor the usps.php file to disable media mail for certain product categories? That was what started my issue last night. I have done this with prior versions of the file but don't want to mess with it if it will break, obviously.
Just FYI, I took a stab at this and it seems to be working, and didn't break my checkout process again. So we're back in business. The code that needs modifying has altered slightly in K11h but it seems you can change it TO the same thing as before. Sorry for vagueness--anyone who wants more explicit info, feel free to ask.
Administrator
dalecooper:
K11h fixed the issue I was having (here: https://www.zen-cart.com/showthread.php?229302-USPS-shipping-module-has-rendered-checkout-inoperable ), so thank you!
Is it safe to doctor the usps.php file to disable media mail for certain product categories? That was what started my issue last night. I have done this with prior versions of the file but don't want to mess with it if it will break, obviously.
FWIW, there's an example of how to do that via an observer-class script in the /extras sub-directory of the USPS shipping module's zip-file. That way, you don't have to re-apply your changes the next time the shipping module's updated.
New Zenner
lat9:
2023-02-14 K11h is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1292
I thought I'd released this a week ago, but the corrections here are most likely the source of the "Server 500" error posted by @wcbutler.
This version corrects the following GitHub issues:
#32: USPS 'cheapest' quotes aren't selected; quotes need to be public.
#31: K11g won't auto-update from K11f
Thank you so much for posting this, I'll try this rev later today. I've had some orders come through successfully on E and really appreciate this plugin as an answer to my issues with zone rates so this is amazing. Do you have a cup of coffee or tip jar type page I can give you some small donation for your work on this?
The oddities in my log might have been me bouncing between versions. I also had a 2013 version that I had never ripped out as I didn't get it working back then.
New Zenner
Confirming H works for me, thank you for uploading this fix!
Zen Follower
Hi @lat9, thanks for your fast updating!
I just tried K11h in my testing site, unfortunately, EMS intl quote doesn't show up. First class intl shows up as normal.
Domestic quote shows up properly (first-class, priority, ems).
zc 1.57d, php 7.4
Totally Zenned
If they are checked in the USPS settings, then perhaps you have a tare/handling charge somewhere that is taking the item's weight beyond that allowed by the selection.
Check Configuration >> Shipping/Packaging to see what those settings are for Package Tare and Larger Package
Zen Follower
Here is an update. I did some tests and I even put my k11e files back to my testing site. EMS intl quote still doesn't showup. Not sure what happens here. My k11e files are working fine in my live site (showing the proper EMS intl quote)
Hi @dbltoe, thanks for your suggestions. I tested the quote by a 0.64lb package, so it should not trigger the max limit. I also checked the page Shipping/Packaging between my test site and live site. They are the same.
Zen Follower
njcyx:
Here is an update. I did some tests and I even put my k11e files back to my testing site. EMS intl quote still doesn't showup. Not sure what happens here. My k11e files are working fine in my live site (showing the proper EMS intl quote)
Hi @dbltoe, thanks for your suggestions. I tested the quote by a 0.64lb package, so it should not trigger the max limit. I also checked the page Shipping/Packaging between my test site and live site. They are the same.
One more update. I just completely "destroyed" and rebuilt my testing site then updated usps to the latest k11h. Yes, I can get the EMS intl quote properly.
Not sure what happens here though...
Administrator
njcyx:
One more update. I just completely "destroyed" and rebuilt my testing site then updated usps to the latest k11h. Yes, I can get the EMS intl quote properly.
Not sure what happens here though...
I'm pretty sure (still investigating) that I foobar'd the auto-update when removing the regional-mail settings.
Zen Follower
Hi @lat9, thanks for your reply.
One more update. I checked the admin settings after I updated my working k11e to k11h (which EMS intl quote is working fine), EMS intl option is unchecked. But its value is strange. Min is "Priority Mail Express InternationalRM". Max is "0". I set both back to the default (min is 0, max is 66) and I checked EMS intl option. EMS intl quote is missing/disappeared.
Then I unchecked the EMS intl option, set both Min and Max back to the strange values above, the quote shows up.
Administrator
There's a ALTER TABLE in the check() method that's going to cause problems for Advanced Shipper users. Would suggest removing it and just adding a note in the install instructions for users of 1.5.4 or below to run this step manually.
Tell staff why this post should be reviewed.