wkdwich Posted January 4, 2011 Share Posted January 4, 2011 Not having fun here.. removed my current module, replaced with http://addons.oscommerce.com/info/487 international is fine - though I have not looked to see if the handling fee was added - but I got a completely blank page on domestic quotes Quote Debbie DFranklin County, VA "Moonshine Capitol of the World"osCmax Mobile Template oscmaxtemplates.com Link to comment Share on other sites More sharing options...
MountainMods Posted January 4, 2011 Share Posted January 4, 2011 Here is My quick fix for USPS domestic rates and international issues i tested both and both are now working Find $this->intl_types = array('GLOBAL EXPRESS' => 'Global Express Guaranteed', 'GLOBAL EXPRESS NON-DOC RECT' => 'Global Express Guaranteed Non-Document Rectangular', 'GLOBAL EXPRESS NON-DOC NON-RECT' => 'Global Express Guaranteed Non-Document Non-Rectangular', 'EXPRESS MAIL INT' => 'Express Mail International', 'EXPRESS MAIL INT FLAT RATE ENV' => 'Express Mail International Flat-Rate Envelope', 'PRIORITY MAIL INT' => 'Priority Mail International', 'PRIORITY MAIL INT FLAT RATE ENV' => 'Priority Mail International Flat-Rate Envelope', 'PRIORITY MAIL INT FLAT RATE BOX' => 'Priority Mail International ' . $this->PriorityFlatRateBoxType, 'FIRST-CLASS MAIL INT' => 'First Class Mail International package** ' . $this->FirstClassIntType); Find $size = sizeof($uspsQuote); for ($i=0; $i<$size; $i++) { list($type, $cost) = each($uspsQuote[$i]); $type = str_replace('<sup>&reg;</sup>', '', $type); $type = str_replace('<sup>&trade;</sup>', '', $type); $type = str_replace('**', '', $type); Find $service = ereg('<SvcDescription>(.*)</SvcDescription>', $services[$i], $regs); $service = $regs[1]; $service = str_replace('<sup>&reg;</sup>', '', $service); $service = str_replace('<sup>&trade;</sup>', '', $service); $postage = ereg('<Postage>(.*)</Postage>', $services[$i], $regs); These changes make it work. to get Handling to work you need to do the $service routine above for the Switch:Case.. Look for this $service = ereg('<MailService>(.*)</MailService>', $response[$i], $regs); $service = $regs[1]; and add the same as above directly following: $service = str_replace('<sup>&reg;</sup>', '', $service); $service = str_replace('<sup>&trade;</sup>', '', $service); Quote Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Share Posted January 4, 2011 Did some tweaking and I've got some of the domestic working. It's not complete. Flat rate options, library, and BPM are not included. All standard (pre-flat rate) domestic options are working - first class, media, parcel, priority, and express. Besides what I already know isn't working or included, if anyone runs across bugs relative to what IS included, let me know. And if anyone can get it working with ANY flat rate options, that would just be icing on the cake. USPS Methods 5.0.1 Quote Link to comment Share on other sites More sharing options...
Golden Posted January 4, 2011 Share Posted January 4, 2011 Did some tweaking and I've got some of the domestic working. It's not complete. Besides what I already know isn't working or included, if anyone runs across bugs relative to what IS included, USPS Methods 5.0.1 Thank you so much, mine is finally working! I only use First Class, Parcel Post & basic Priority (since most do not choose the correct size box) and they are showing during check-out. I did notice that the shipping calculator is no longer showing in the cart for international (does for domestic), not a huge problem. Thanks again for all your work! Quote Link to comment Share on other sites More sharing options...
wkdwich Posted January 4, 2011 Share Posted January 4, 2011 Jetta, installed and followed your instructions to a T, easy enough.. immediately tested domestic and again I am getting a blank screen so I turned it off again Quote Debbie DFranklin County, VA "Moonshine Capitol of the World"osCmax Mobile Template oscmaxtemplates.com Link to comment Share on other sites More sharing options...
Jayman11 Posted January 4, 2011 Share Posted January 4, 2011 Awesome! Rates are pulling through like usual. The only thing that I can't get to work is the estimated shipping time on first class domestic. shows up fine on the priority but not on the first class for some reason. Quote Link to comment Share on other sites More sharing options...
getflocked Posted January 4, 2011 Share Posted January 4, 2011 (edited) I installed the latest USPS contribution and it's working for me too. The only off thing I noticed is that Domestic quotes don't show the delivery time, but I will most likely hard code those temporarily. I only offer Express and Priority... By the way, I edited out the 'library' additions and left out the _vti_cnf files and directories that were added by Fulluv Scents. Thank you everyone!! UPDATE: domestic options show priority on the confirmation page no matter which is chosen (priority or express). I'm now only offering priority until I can fix this. Edited January 4, 2011 by getflocked Quote Link to comment Share on other sites More sharing options...
Dennisra Posted January 4, 2011 Share Posted January 4, 2011 Jetta: Your latest contribution 5.0.1 is working perfectly for me. International and domestic. Also any changes to shipping method carry over to the confirmation page correctly. Thank you very kindly for your efforts! I wish you good health and prosperity in the New Year! Did some tweaking and I've got some of the domestic working. It's not complete. Flat rate options, library, and BPM are not included. All standard (pre-flat rate) domestic options are working - first class, media, parcel, priority, and express. Besides what I already know isn't working or included, if anyone runs across bugs relative to what IS included, let me know. And if anyone can get it working with ANY flat rate options, that would just be icing on the cake. USPS Methods 5.0.1 Quote Link to comment Share on other sites More sharing options...
dsolutions Posted January 4, 2011 Share Posted January 4, 2011 For those of you that are wondering how to make the First Class Mail Estimate show back up, find the case below: case 'First Class Mail': $time = 'Estimated 1 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; default: $time = ''; change to: case 'First-Class Mail Package': $time = 'Estimated 1 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; default: $time = ''; Good team work by the way! Quote Link to comment Share on other sites More sharing options...
Dennisra Posted January 4, 2011 Share Posted January 4, 2011 That worked nicely. Thank you. For those of you that are wondering how to make the First Class Mail Estimate show back up, find the case below: Quote Link to comment Share on other sites More sharing options...
mabiem Posted January 4, 2011 Share Posted January 4, 2011 I've added 5.0.1 however I can no longer select the international shipping options. They all show up and in the admin panel the check boxes are missing. There were there before. Mike Quote Link to comment Share on other sites More sharing options...
kb6mcc Posted January 4, 2011 Share Posted January 4, 2011 Did some tweaking and I've got some of the domestic working. It's not complete. Flat rate options, library, and BPM are not included. All standard (pre-flat rate) domestic options are working - first class, media, parcel, priority, and express. Besides what I already know isn't working or included, if anyone runs across bugs relative to what IS included, let me know. And if anyone can get it working with ANY flat rate options, that would just be icing on the cake. USPS Methods 5.0.1 All working!! :lol: :lol: Thanks for your good works.. :thumbsup: Quote Link to comment Share on other sites More sharing options...
getflocked Posted January 4, 2011 Share Posted January 4, 2011 Yay! USPS 5.0.1 installed and working perfectly. Thank you so much everyone and Fulluv Scents for completion!! Quote Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Share Posted January 4, 2011 We are back up thanks for the contribution, you all rock. I did notice that we can't select international options from the admin panel anymore. Also notice that first class international is not showing up. Any help please. Thanks Quote Link to comment Share on other sites More sharing options...
kieran_mullen Posted January 4, 2011 Share Posted January 4, 2011 I do not believe it is adding in the handling charge. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Share Posted January 4, 2011 The _vti_cnf files were not meant to be added to contribution 5.0.0 and should not be uploaded. The fix for first class shipping times is : find: case 'First-Class Mail': $time = 'Estimated 1 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; default: $time = ''; replace with: case 'First-Class Mail': $time = 'Estimated 1 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; default: $time = ''; break; case 'First-Class Mail Flat': $time = 'Estimated 1 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; default: $time = ''; break; case 'First-Class Mail Letter': $time = 'Estimated 1 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; default: $time = ''; break; case 'First-Class Mail Package': $time = 'Estimated 1 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; break; default: $time = ''; break; @ getflocked: 5.0.1 fixed the domestic issue. Rates don't revert back to default at confirmation. The registered trademark string had to be stripped to stop the reversion. It does not fix the flat rate envelope and flat rate box reversion, but it does stop the reversion for standard shipping options. 5.0.1 also removed flat rate options until someone can find a way to get them working correctly. Find: $http->Disconnect(); } else { return false; } ADD AFTER: $body = str_replace('<sup>&reg;</sup>', '', $body); $body = str_replace('<sup>&trade;</sup>', '', $body); @ mabiem & jjvillarinc: The international options in the admin panel work fine for me. I've turned options on and off, uninstalled and reinstalled and have had no problems with it. Since it isn't replicating from my end, hopefully someone else can find the fix. Did you uninstall from admin panel before or after uploading the new files? Try reverting back to your old file (if you still have a copy), do the uninstall, and THEN upload the new files. It could be that options weren't cleared from your database correctly before you uploaded the new file. IDK, but it's a thought. @ kieran_mullen: Handling fee is being added on my site for both international and domestic. My bug is priority flat rate shipping. Anyone have any ideas for that? Quote Link to comment Share on other sites More sharing options...
wkdwich Posted January 4, 2011 Share Posted January 4, 2011 I also do not see the int'l options to check on and off with 5.0 or 5.1 Int'l did work but this version does not have seperate handling fees for int'l like the version I was using. I commented out the lines for the rates I don't offer and that worked on the client side - but I never went through and finished checkout so I dont know if it was reverting. HOWEVER --- nothing I have been able to accomplish gives me anything on the domestic side.. as a matter of fact I get a totally blank screen, no errors, nothing.. I'm going to go back to square one on my dev cart and see what I can find there.. I suppose I was doing so much trial and error I foo-bar'd something bad.. The working version I had was: USPS Methods 4.3.2 Fix international services Jan 8, 2010 Quote Debbie DFranklin County, VA "Moonshine Capitol of the World"osCmax Mobile Template oscmaxtemplates.com Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Share Posted January 4, 2011 I found the problem for the options not showing up in admin it had to do with the database. The reason being the field "set_fuction" in the "configuration" table was set to varchar 255 and since we added more values it was only showing up to the 255 characters. I bumped it up to 1020 so the field looks like: set_function varchar(1020) and now all the international options are displaying in admin and I'm able to select / deselect them. -J p.s. thanks for all your help. @full you pointed me in the right direction .. so thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Share Posted January 4, 2011 You need to change the 'set_function' field in the 'configuration' table to varchar 1020 originally it was set to varchar 255. -J I also do not see the int'l options to check on and off with 5.0 or 5.1 Int'l did work but this version does not have seperate handling fees for int'l like the version I was using. I commented out the lines for the rates I don't offer and that worked on the client side - but I never went through and finished checkout so I dont know if it was reverting. HOWEVER --- nothing I have been able to accomplish gives me anything on the domestic side.. as a matter of fact I get a totally blank screen, no errors, nothing.. I'm going to go back to square one on my dev cart and see what I can find there.. I suppose I was doing so much trial and error I foo-bar'd something bad.. The working version I had was: USPS Methods 4.3.2 Fix international services Jan 8, 2010 Quote Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Share Posted January 4, 2011 I have installed 5.0.1 and everything seems to be working. The issue I have is the debug mail that gets generated on each query to USPS. It seems to be located in this area if ($http->Connect($usps_server, 80)) { $http->addHeader('Host', $usps_server); $http->addHeader('User-Agent', 'osCommerce'); $http->addHeader('Connection', 'Close'); if ($http->Get('/' . $api_dll . '?' . $request)) $body = $http->getBody(); mail('[email protected]','USPS rate quote response',$body,'From: <[email protected]>'); if ($transit && is_array($transreq) && ($order->delivery['country']['id'] == STORE_COUNTRY)) { while (list($key, $value) = each($transreq)) { if ($http->Get('/' . $api_dll . '?' . $value)) $transresp[$key] = $http->getBody(); } } $http->Disconnect(); } else { return false; } Can I just comment out the line with the mail function without adversely affecting anything? I'm getting flooded with bounces from the server... Quote Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Share Posted January 4, 2011 I had the same problem and I fixed it. All options domestic and international are showing up in both front end and control panel. I've added 5.0.1 however I can no longer select the international shipping options. They all show up and in the admin panel the check boxes are missing. There were there before. Mike Quote Link to comment Share on other sites More sharing options...
Dennisra Posted January 4, 2011 Share Posted January 4, 2011 Try // and then test it. I have installed 5.0.1 and everything seems to be working. The issue I have is the debug mail that gets generated on each query to USPS. It seems to be located in this area if ($http->Connect($usps_server, 80)) { $http->addHeader('Host', $usps_server); $http->addHeader('User-Agent', 'osCommerce'); $http->addHeader('Connection', 'Close'); if ($http->Get('/' . $api_dll . '?' . $request)) $body = $http->getBody(); mail('[email protected]','USPS rate quote response',$body,'From: <[email protected]>'); if ($transit && is_array($transreq) && ($order->delivery['country']['id'] == STORE_COUNTRY)) { while (list($key, $value) = each($transreq)) { if ($http->Get('/' . $api_dll . '?' . $value)) $transresp[$key] = $http->getBody(); } } $http->Disconnect(); } else { return false; } Can I just comment out the line with the mail function without adversely affecting anything? I'm getting flooded with bounces from the server... Quote Link to comment Share on other sites More sharing options...
mabiem Posted January 4, 2011 Share Posted January 4, 2011 Ok setting the 'set_function' field in the 'configuration' table to varchar 1020 fixed my Admin Panel Int'l shipping options issue. I'm having a new issue. I have a test account with a domestic and international address. I backed everything back to yesterday and was getting the original issue everyone is getting. I installed 5.0.1 (just coping the two files nothing else) with the module uninstalled. I re-installed the module and everything appears to work well. Once I select shipping int'l shipping I go back and try to switch to a domestic address and my checkout page goes blank. Nothing fixes it except reinstalling the original usps module files. Mike Quote Link to comment Share on other sites More sharing options...
mabiem Posted January 4, 2011 Share Posted January 4, 2011 Not having fun here.. removed my current module, replaced with http://addons.oscommerce.com/info/487 international is fine - though I have not looked to see if the handling fee was added - but I got a completely blank page on domestic quotes This sounds like what I'm getting. Quote Link to comment Share on other sites More sharing options...
wkdwich Posted January 4, 2011 Share Posted January 4, 2011 I found the problem for the options not showing up in admin it had to do with the database. The reason being the field "set_fuction" in the "configuration" table was set to varchar 255 and since we added more values it was only showing up to the 255 characters. I bumped it up to 1020 so the field looks like: set_function varchar(1020) and now all the international options are displaying in admin and I'm able to select / deselect them. -J p.s. thanks for all your help. @full you pointed me in the right direction .. so thanks I dont get where to make this change .. can you be more specific please? Quote Debbie DFranklin County, VA "Moonshine Capitol of the World"osCmax Mobile Template oscmaxtemplates.com 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.