Page 1 of 2 12 LastLast
Results 1 to 10 of 15

error using USPS

This is a discussion on error using USPS within the USPS forums, part of the Shipping Modules category; I get this error during checkout. An error occured with the USPS shipping calculations. If you prefer to use USPS ...

      
  1. #1
    New Member
    Join Date
    Mar 2007
    Posts
    5
    Rep Power
    0


    Default error using USPS

    I get this error during checkout.

    An error occured with the USPS shipping calculations.
    If you prefer to use USPS as your shipping method, please contact the store owner.

    I had a site running and I have used this module before with all the correct setting for almost 100 orders before this. Its just that I migrated to a different server and now this module doesnt seem to work.

    Please help as I have a live shop and I desperately need help as I am out of all ideas
    Thanks
    Nilesh

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: error using USPS

    Quote Originally Posted by geeknano View Post
    I get this error during checkout.

    An error occured with the USPS shipping calculations.
    If you prefer to use USPS as your shipping method, please contact the store owner.

    I had a site running and I have used this module before with all the correct setting for almost 100 orders before this. Its just that I migrated to a different server and now this module doesnt seem to work.

    Please help as I have a live shop and I desperately need help as I am out of all ideas
    Thanks
    Nilesh
    Double check your configure.php files - if you moved servers your path may have changed.

  3. #3
    New Member
    Join Date
    Mar 2007
    Posts
    5
    Rep Power
    0


    Default Re: error using USPS

    thanks you very much for the reply ? do you know what exactly would affect this in configure.php ? i mean what path is related to the shipping module or usps or maybe checkout page ?
    Thanks

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: error using USPS

    Possibly:
    define('DIR_FS_CATALOG', '....your web servers path to your install....');
    and/or
    define('HTTP_COOKIE_DOMAIN', 'your domain');
    define('HTTPS_COOKIE_DOMAIN', 'your domain-maybe different');
    define('HTTP_COOKIE_PATH', '/catalog/');
    define('HTTPS_COOKIE_PATH', '/catalog-maybe different/');
    define('DIR_WS_HTTP_CATALOG', '/catalog/');
    define('DIR_WS_HTTPS_CATALOG', '/catalog-maybe different/');

  5. #5
    Lurker
    Join Date
    Aug 2005
    Posts
    2
    Rep Power
    0


    Default Re: error using USPS

    USPS changed the naming in the 14th oy may 2007, by so you do have to change the file : inlcudes/module/shipping/usps.php


    1) near line 54

    //$this->intl_types = array('GXG Document' => 'Global Express Guaranteed Document Service',
    // 'GXG Non-Document' => 'Global Express Guaranteed Non-Document Service',
    // 'Express' => 'Global Express Mail (EMS)',
    // 'Priority Lg' => 'Global Priority Mail - Flat-rate Envelope (large)',
    // 'Priority Sm' => 'Global Priority Mail - Flat-rate Envelope (small)',
    // 'Priority Var' => 'Global Priority Mail - Variable Weight Envelope (single)',
    // 'Airmail Letter' => 'Airmail Letter Post',
    // 'Airmail Parcel' => 'Airmail Parcel Post',
    // 'Surface Letter' => 'Economy (Surface) Letter Post',
    // 'Surface Post' => 'Economy (Surface) Parcel Post');

    //E.Bianchetti as per USPS new system of 14th of may 2007

    $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 (EMS)',
    'Express Mail Int Flat Rate Env' => 'Express Mail International (EMS) 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 Flat Rate Box',
    'First-Class Mail Int' => 'First-Class Mail International');




    2) near line 154

    //tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Int\'l Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_INTL', 'GXG Document, GXG Non-Document, Express, Priority Lg, Priority Sm, Priority Var, Airmail Letter, Airmail Parcel, Surface Letter, Surface Post', 'Select the international services to be offered:', '6', '15', 'tep_cfg_select_multioption(array(\'GXG Document\', \'GXG Non-Document\', \'Express\', \'Priority Lg\', \'Priority Sm\', \'Priority Var\', \'Airmail Letter\', \'Airmail Parcel\', \'Surface Letter\', \'Surface Post\'), ', now())");

    //E.Bianchetti mod as per USPS changes the 14th of may 2007
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Int\'l Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_INTL', 'Global Express, Global Express Non-Doc Rect, Global Express Non-Doc Non-Rect, Express Mail Int, Express Mail Int Flat Rate Env, Priority Mail Int, Priority Mail Int Flat Rate Env, Priority Mail Int Flat Rate Box, First-Class Mail Int', 'Select the international services to be offered:', '6', '15', 'tep_cfg_select_multioption(array(\'Global Express\', \'Global Express Non-Doc Rect\', \'Global Express Non-Doc Non-Rect\', \'Express Mail Int\', \'Express Mail Int Flat Rate Env\', \'Priority Mail Int\', \'Priority Mail Int Flat Rate Env\', \'Priority Mail Int Flat Rate Box\', \'First-Class Mail Int\'), ', now())");


    3) near line 400 (not sure if the file was modified earlier, but I had to do that call to the db to make it work)

    $query= "select * from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_USPS_TYPES_INTL'";
    $action = mysql_query($query) or die (mysql_error());
    while($values=mysql_fetch_array($action)) {
    $test_eric = $values['configuration_value'];
    }

    foreach( explode(", ", $test_eric) as $value ) {
    $allowed_types[$value] = $this->intl_types[$value];
    }

    instead of

    foreach( explode(", ",MODULE_SHIPPING_USPS_TYPES_INTL) as $value ) $allowed_types[$value] = $this->intl_types[$value];

  6. #6
    osCMax Testing Team wkdwich's Avatar
    Join Date
    Jul 2007
    Posts
    249
    Rep Power
    11


    Default Re: error using USPS

    I am having this problem with a fresh install also.. I have a USPS account working in another shopping cart (not osC).. I can get domestic shipping but not international.. I called USPS and (grr was oon hold forever!) they say since I am already using the account on another cart I am set to production, nothing for them to do..

    I altered the file as you suggest here, but when I click install nothing happens at all..

    Can someone send me the altered corrected file?? thanks

    I need: catalog\includes\modules\shipping\usps.php corrected for the new USPS rules

  7. #7
    osCMax Testing Team wkdwich's Avatar
    Join Date
    Jul 2007
    Posts
    249
    Rep Power
    11


    Default Re: error using USPS

    Anyone?? I am ready to open the store except for this error.. please can someone help?

  8. #8
    osCMax Development Team met00's Avatar
    Join Date
    Oct 2005
    Location
    wherever I happen to be at the moment
    Posts
    854
    Blog Entries
    2
    Rep Power
    21


    Default Re: error using USPS

    okay, this is called debugging, but what is USPS returning? For instance,m when I was having a similar problem with UPS I checked and found that I had a max weight that was larger than UPSs max weight and the actual message being returned by UPS told me what the problem was.

    so the questions in debugging in order are:
    1) am I getting to the production server?
    2) what is the production server returning as a response?

    If you aren't even getting to the production server, then the odds are that you don't have something configured properly.

    If you are getting there, then they will tell you what the problems are.
    so endith the lesson
    <think>sometimes I just sit's and thinks</think>
    "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB

  9. #9
    osCMax Testing Team wkdwich's Avatar
    Join Date
    Jul 2007
    Posts
    249
    Rep Power
    11


    Default Re: error using USPS

    I did get it to work this morning, and got so involved getting things ready to open the store I forgot to respond.. here is what I accomplished:

    performed sql update
    Code:
    UPDATE `configuration` SET `set_function` = 'tep_cfg_select_multioption(array(''Global Express'', ''Global Express Non-Doc Rect'', ''Global Express Non-Doc Non-Rect'', ''Express Mail Int'', ''Express Mail Int Flat Rate Env'', ''Priority Mail Int'', ''Priority Mail Int Flat Rate Env'', ''Priority Mail Int Flat Rate Box'', ''First-Class Mail Int''),' WHERE `configuration_key` ='MODULE_SHIPPING_USPS_TYPES_INTL' LIMIT 1 ;
    uninstalled the USPS module

    uploaded bkpie's copy from this post:
    Going Postal

    and reinstalled.. eveyrthing works fine now thanks for the response

  10. #10
    Lurker
    Join Date
    Aug 2005
    Posts
    2
    Rep Power
    0


    Default Re: error using USPS

    You right, in the fix I posted I simply forgot the SQL. Anyway it was a fix I did in 10 mn for my ex employer (the new coder is not able to create something like that lol), so I simply worked fast and when I posted I forgot that.

    On the other hand, Osc = Free sofware. My phylosophy is anyone who use free sofware have to learn a bit about it (same as a race pilot know how the car is working), and certainly not rely on : "Send me the files modified". It would be a lazy attitude.

Page 1 of 2 12 LastLast

Similar Threads

  1. USPS Methods
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-23-2007, 09:11 AM
  2. USPS trouble anyone?
    By dougnyc in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 12-05-2003, 10:32 PM
  3. USPS Shipping - please help "An error occured with the
    By thasin in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 09-15-2003, 07:09 AM
  4. USPS Problems
    By XTSCrankN in forum osCommerce 2.2 Installation Help
    Replies: 1
    Last Post: 02-20-2003, 07:51 AM
  5. error message with usps
    By Anonymous in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 12-15-2002, 05:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •