Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS v2.2 Error


badjuju

Recommended Posts

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();

}

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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');

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...