badjuju Posted January 19, 2003 Share Posted January 19, 2003 Has anyone seen this error before? I'm using oscommerce v2.2 snapshot from 01162203. I looked at all files and uploaded and renamed general.php_v1.148+USPSMethods_v2.2 to their respective names. Since I'm on a newer version, I did not patch the files because they were pretty much up to date. Please help. Thanks Error Message: Warning: Variable passed to each() is not an array or object in /home/moda/public_html/store/catalog/includes/modules/shipping/usps.php on line 245 Warning: Cannot add header information - headers already sent by (output started at /home/moda/public_html/store/catalog/includes/modules/shipping/usps.php:245) in /home/moda/public_html/store/catalog/includes/functions/general.php on line 23 Line 244 - 248 read: if ($transit && ($order->delivery['country']['id'] == STORE_COUNTRY)) { while (list($key, $value) = each($transreq)) { if ($http->Get('/' . $api_dll . '?' . $value)) $transresp[$key] = $http->getBody(); } } Lines 20-23 read: if (STORE_PAGE_PARSE_TIME == 'true') { if (!is_object($logger)) $logger = new logger; $logger->timer_stop(); } Quote Link to comment Share on other sites More sharing options...
Guest Posted January 19, 2003 Share Posted January 19, 2003 You have to patch the files. I recently went through this installation and I literally had to go through each file and update the information manually. The only file I completely replaced was /catlog/includes/modules/shipping/usps.php. I tried to modifiy it directly, but it kept having problems. Good Luck! -R Quote Link to comment Share on other sites More sharing options...
badjuju Posted January 19, 2003 Author Share Posted January 19, 2003 Thanks. Now one more question - how do I patch the files. I know the doc said use patch filename.diff, but it;s not working. Please tell me the exact commands to use - something like an idiot's guide :) Quote Link to comment Share on other sites More sharing options...
Guest Posted January 20, 2003 Share Posted January 20, 2003 You can use any text editor, including NotePad, to modify the code of each file. Each of the files that the USPS Shipping Methods v2.2 instructions say are supposed to be patched, has a text version of just the changes required for that file, or an already completed version of the file that has already been modified with the necessary changes. Between the 2 files, you should be able to figure out what code gets updated. Good Luck. -R Quote Link to comment Share on other sites More sharing options...
frozengeek Posted January 20, 2003 Share Posted January 20, 2003 I found Linda McGrath's advice to use Beyond Compare a huge help -- side-by-side file comparisons with all the differences highlighted. Saves me a LOT of time and frustration :D Anne Quote Link to comment Share on other sites More sharing options...
badjuju Posted January 20, 2003 Author Share Posted January 20, 2003 Thanks frozengeek. I 'll see if this works - even though I tried this already. That's why I asked ugottasalsa what he did. oh well Quote Link to comment Share on other sites More sharing options...
fdb Posted January 28, 2003 Share Posted January 28, 2003 i get the same error ONLY when i choose first-class shipping. i've patched all files needed too Quote Link to comment Share on other sites More sharing options...
hobbzilla Posted January 28, 2003 Share Posted January 28, 2003 Download the files you need here for USPS with USPSMethods patched.. you will then need to disable then re-enable via admin. /admin/includes/functions/general.php http://www.hobbzilla.com/oscommerce/general.phps /admin/modules.php http://www.hobbzilla.com/oscommerce/modules.phps catalog/includes/modules/shipping/usps.php http://www.hobbzilla.com/oscommerce/usps.phps Also you will need to edit your language (usps.php) files to include: define('MODULE_SHIPPING_USPS_TEXT_DAY', 'Day'); define('MODULE_SHIPPING_USPS_TEXT_DAYS', 'Days'); define('MODULE_SHIPPING_USPS_TEXT_WEEKS', 'Weeks'); Quote Link to comment Share on other sites More sharing options...
fdb Posted January 29, 2003 Share Posted January 29, 2003 thx! Quote Link to comment Share on other sites More sharing options...
rhytha Posted January 29, 2003 Share Posted January 29, 2003 hi zilla i downloaded u r files and tried them, but iam getting a blank page when i checkout, my admin screen shows all the options like airmail pritorymail etc, but no place to put the products server url. can u tell me what is wrong. thanx Quote Link to comment Share on other sites More sharing options...
Trusten Posted February 2, 2003 Share Posted February 2, 2003 Did anyone find the solution to this error cuz that's the first class error i'm getting right now.... Quote Link to comment Share on other sites More sharing options...
Trusten Posted February 2, 2003 Share Posted February 2, 2003 found the solution. believe it or not, and i can hardly believe it myself, but it's an error that has nothing to do with first class. if you go to admin, then modules, then shipping, then go ahead and just select the usps module. DESELECT 'tansite time' and leave only weight, cuz for some reason i can't deselect weight with transit time. anyhow, do that and it seems to be working.... Quote Link to comment Share on other sites More sharing options...
zzfritz Posted February 17, 2003 Share Posted February 17, 2003 I have revised USPS Methods as version 2.3, with the most current cvs functionality for separate handling fee, sort order and tax class: http://www.oscommerce.com/community/contributions,487 This time the contribution is in scripts, not diffs, and the instructions are improved. 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.