DesertCoder Posted August 5, 2013 Posted August 5, 2013 @@dculley On July 28, the USPS made changes to their APIs that have resulted in the problem you are experiencing. I've just been fixing it in my stores. Our friend @@kymation has taken over this module, look back through the pages, he has provided a link to a new module and instructions here in this thread. The link can be found on page 29, post #575: http://www.oscommerce.com/forums/topic/383307-usps-rate-v4-intl-rate-v2-official-support-thread/page__st__560 As for what to do with it, see his responses to my question: "It's the module file -- catalog/includes/modules/shipping/usps.php. Be warned that it doesn't work completely. First class is still a mess." I hope that helps! Chewers, DesertCoder Quote
dculley Posted August 5, 2013 Posted August 5, 2013 OMG - Thanks guys, It is late where I'm out and I will tackle this tomorrow. I need a clear head for this one. DesertCoder - Thanks I will look and see what it does. Jim - is in update to this package forth coming soon? Quote
DesertCoder Posted August 5, 2013 Posted August 5, 2013 @@kymation Well... Here's what I get now: Warning: include_once(includes/classes/http_client.php) [function.include-once]: failed to open stream: No such file or directory in /home/content/path/path/html/sitename/ext/modules/payment/paypal/express.php on line 4 Warning: include_once() [function.include]: Failed opening 'includes/classes/http_client.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/path/path/html/sitename/ext/modules/payment/paypal/express.php on line 4 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/77/7516777/html/LDcomics/ext/modules/payment/paypal/express.php:4) in /home/content/path/path/html/sitename/includes/functions/sessions.php on line 102 Fatal error: Class 'httpClient' not found in /home/content/path/path/html/sitename/includes/modules/shipping/usps.php on line 359 I added the code you suggested right at the top just under the opening php tag. The files DO exist where the error says they do not. Head scratching time... Cheers and thanks, DesertCoder Quote
♥kymation Posted August 5, 2013 Posted August 5, 2013 @@dculley This one is pretty much abandoned. I'm tired of fixing modules twice a year. I'm building one that won't break so easily when USPS decides the change the names of their services. You can read the module development thread if you're interested. @@DesertCoder That won't work if the file is being called on the Admin side. You'll have to give it the correct path from there. Try ../includes/classes/http_client.php Regards Jim Quote See my profile for a list of my addons and ways to get support.
DesertCoder Posted August 5, 2013 Posted August 5, 2013 @@kymation I don't know that is IS being called on the admin side. This happens to the user during checkout. Cheers, DesertCoder Quote
♥kymation Posted August 5, 2013 Posted August 5, 2013 Then the original version should have worked. Maybe it thinks the calling file is in the paypal directory. In that case the code would be include_once(../../../../includes/classes/http_client.php) This is getting messy. Regards Jim Quote See my profile for a list of my addons and ways to get support.
DesertCoder Posted August 5, 2013 Posted August 5, 2013 @@kymation Nope, that threw errors as well. Cheers, DesertCoder Quote
DesertCoder Posted August 5, 2013 Posted August 5, 2013 Then the original version should have worked. Maybe it thinks the calling file is in the paypal directory. In that case the code would be include_once(../../../../includes/classes/http_client.php) This is getting messy. Regards Jim @@kymation THAT FIXED IT!!! Quote
♥kymation Posted August 5, 2013 Posted August 5, 2013 So much for the shotgun approach. I'm afraid you're going to have to chase it down. Or try the USPS Methods module. Or use the table approach. Regards Jim Quote See my profile for a list of my addons and ways to get support.
DesertCoder Posted August 5, 2013 Posted August 5, 2013 @@kymation See above! You did it! Cheers to you!!! DesertCoder Quote
♥kymation Posted August 5, 2013 Posted August 5, 2013 I'm glad that worked. Sometimes the old shotgun saves some time. It's a good thing, too, as the Paypal code is a pain to dig through. Regards Jim Quote See my profile for a list of my addons and ways to get support.
negativeexistence Posted August 5, 2013 Posted August 5, 2013 @@kymation - Thanks for the new file!!! This is alot cleaner looking than the Frankenstein files I was working with earlier. Does anyone have a fix for domestic first class yet? Quote
♥kymation Posted August 5, 2013 Posted August 5, 2013 (edited) It appears that USPS has finally fixed the First Class rate response. Previously all of the First Class services were returning the same service name, which made it difficult to get this code to select the right service. The services now seem to be returning the correct values, so I've updated the code. You can find the file here. Again, this replaces the catalog/includes/modules/shipping/usps.php file, and you must have the V4 addon files as well. The USPS server is being somewhat unreliable right now, so this is not extensively tested. Regards Jim Edited August 5, 2013 by kymation Quote See my profile for a list of my addons and ways to get support.
dculley Posted August 5, 2013 Posted August 5, 2013 I just got in to the office. Downloaded and installed the above. All is working but first class is not showing up as an option on the checkout side. Take it this is something still being worked on? Quote
♥kymation Posted August 5, 2013 Posted August 5, 2013 Did you uninstall and reinstall the module in your Admin? Do you have one of the First Class options selected in your Admin? Regards Jim Quote See my profile for a list of my addons and ways to get support.
dculley Posted August 5, 2013 Posted August 5, 2013 I did - I uninstalled, renamed the old file (because I'm a chicken) and uploaded the new one. I reinstalled and have checked by both first class. I know thes is the new file because the options have changed. Quote
dculley Posted August 5, 2013 Posted August 5, 2013 I don't know if this helps. In Admin, edit an item in the catalog and click on Restrict USPS shipping method, it shows up there. So the admin side seems to be wroking. Just on checkout it is not showing up. The 2 items I tested one weighs 3oz and the other 6oz on 2 differnt orders. Quote
♥kymation Posted August 5, 2013 Posted August 5, 2013 Apparently the First Class rates fix is not universal. I'm going back to working on the new code. That's a better use of my time long-term. This old code is just too much of a mess. Regards Jim Quote See my profile for a list of my addons and ways to get support.
dculley Posted August 5, 2013 Posted August 5, 2013 I'm very glad to have Priority back up. At least I have something. And I thank you for that. Will be on the look out for the first class fix or next try. Thanks again. Quote
cubicdissection Posted August 5, 2013 Posted August 5, 2013 @@kymation Thank you very much for your help - downloaded your fixed module and it works great! Quote
DANMAC Posted August 6, 2013 Posted August 6, 2013 Hello I have this add on installed - I tried the updated file in the above posted but get the error that refers to line 359 (when checking out with PayPal). Is there a working patch for this ? or any other information for fixing this issue? Thank You! Quote
a.forever Posted August 6, 2013 Posted August 6, 2013 (edited) @@kymation - Thanks for the new file!!! This is alot cleaner looking than the Frankenstein files I was working with earlier. Does anyone have a fix for domestic first class yet? It appears that USPS has finally fixed the First Class rate response. Previously all of the First Class services were returning the same service name, which made it difficult to get this code to select the right service. The services now seem to be returning the correct values, so I've updated the code. You can find the file here. Again, this replaces the catalog/includes/modules/shipping/usps.php file, and you must have the V4 addon files as well. The USPS server is being somewhat unreliable right now, so this is not extensively tested. Regards Jim I just got in to the office. Downloaded and installed the above. All is working but first class is not showing up as an option on the checkout side. Take it this is something still being worked on? It appears that MailService still returns First-Class Mail for all Letter, Large Envelope, and Parcel. I've developed a workaround for Letter and Parcel (the two I use) and included First-Class International Letter. Basically, there's one line where I hard-coded the weight-limits I wanted for First-Class.to 0.1875 pounds (or 3 ounces). First-Class Letter rates will show if shipping weight is less than 3 ounces, but First-Class Parcel rates will show if shipping weight is 3 ounces or greater. I suppose one can mod it further to include Large Envelope. The 0.1875 number can be changed to anything up to 3.5 ounces (or 0.21875). It doesn't grant us the option of offering both Letter, Large Envelope, and Parcel simultaneously. But at least First-Class works now, to some degree. All in all, I'm happy with this version for now. Thanks to @@kymation for all the work done to making it functional with the latest USPS changes. See attached file and use at your own risk. usps_fcmod.php Edited August 6, 2013 by a.forever Quote
♥kymation Posted August 6, 2013 Posted August 6, 2013 @a.forever That's odd. I'm getting the correct responses. For example: First-Class<sup>™</sup> Package Service I would very much like to know what the difference is. Are there multiple USPS servers that don't have all the updates? Is there just one server but different results depending on origin/destination? Would you be willing to do some testing? Regards Jim Quote See my profile for a list of my addons and ways to get support.
dculley Posted August 6, 2013 Posted August 6, 2013 My Canada customers are ordering under First Class Intl. Just got orders coming back in from them. YA. So it must be showing up for them. Just not domistic USA. I'm not a code writer. I be willing to help anyway I can to help find a fix for this. Just let me know. Quote
♥kymation Posted August 6, 2013 Posted August 6, 2013 @@dculley I uploaded my test file to the development addon page. Please download that and read the instructions in the top of the file. Add your USPS id, save, and upload to your store. Open the file in your browser. It will show arrays of the services available from USPS. You want to look for the Domestic and International First Class service names. 1. Are those services showing just "First Class Mail" or do they show more information? 2. Just under the line where you added your USPS ID there are defines for the source and destination ZIP codes. Change the source to your ZIP and try again. Does the output change? Please post here with your results. This will help understand the problem. With more information we can fix existing modules and build a better replacement module. Regards Jim Quote See my profile for a list of my addons and ways to get support.
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.
Note: Your post will require moderator approval before it will be visible.