Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,631
    Plugin Contributions
    6

    Default UPDATE: USPS January 4, 2010

    USPS has updated their code for January 4, 2010

    This Zip file is for v1.3.8/v1.3.8a for the RateV3 and new shipping methods

    NOTE: You will need to do a REMOVE, INSTALL and Configure for the changes to take effect ...

    NOTE: for older versions (prior to 1.3.x), try changing the line:
    Code:
    class usps extends base {
    to read:
    Code:
    class usps {
    Attached Files Attached Files
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,631
    Plugin Contributions
    6

    Default Re: UPDATE: USPS January 4, 2010

    A minor ADDITIONAL change is needed to the January 4, 2010 update that affects International Shipping, when ounces are extended beyond 5 digits.

    The change is minor and can be done without the need to reinstall the code by changing the line at 160 from:
    Code:
        $shipping_ounces = (16 * ($usps_shipping_weight - floor($usps_shipping_weight)));
    to now read:
    Code:
        $shipping_ounces = (16 * ($usps_shipping_weight - floor($usps_shipping_weight)));
        // usps currently cannot handle more than 5 digits on international
        $shipping_ounces = zen_round($shipping_ounces, 3);
    This does not affect the regular US shipping quotes only the International shipping quotes.

    This should be the last change needed for this file ... I hope ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,631
    Plugin Contributions
    6

    Default Re: UPDATE: USPS January 4, 2010

    There are a few additional changes for the January 4 2010 USPS Update ...

    To ensure that you have the correct code, be sure to go to the Modules ... Shipping ...

    1 Save your current settings to NotePad

    2 REMOVE the current module

    3 Load the new usps.php file to the server with your FTP software

    4 INSTALL the new module

    5 Reconfigure the module for your settings
    Attached Files Attached Files
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,631
    Plugin Contributions
    6

    Default Re: UPDATE: USPS January 4, 2010

    For anyone needing the International Global Express Envelopes - USPS GXG Envelopes, add the line:
    Code:
        $this->intl_types = array(
            'Global Express' => 'Global Express Guaranteed (GXG)',
            'Global Express Non-Doc Rect' => 'Global Express Guaranteed Non-Document Rectangular',
            'Global Express Non-Doc Non-Rect' => 'Global Express Guaranteed Non-Document Non-Rectangular',
            'Global Express Envelopes' => 'USPS GXG Envelopes',
            'Express Mail Int' => 'Express Mail International',
            'Express Mail Int Flat Rate Env' => 'Express Mail International Flat Rate Envelope',
            'Priority Mail International' => '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',
            'Priority Mail Int Flat Rate Small Box' => 'Priority Mail International Small Flat Rate Box',
            'Priority Mail Int Flat Rate Med Box' => 'Priority Mail International Medium Flat Rate Box',
            'Priority Mail Int Flat Rate Lrg Box' => 'Priority Mail International Large Flat Rate Box',
            'First Class Mail Int Lrg Env' => 'First-Class Mail International Large Envelope',
            'First Class Mail Int Package' => 'First-Class Mail International Package',
            'First Class Mail Int Letter' => 'First-Class Mail International Letter'
            );
    and change the line to read:
    Code:
        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('International Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES_INTL', 'Global Express, Global Express Non-Doc Rect, Global Express Non-Doc Non-Rect, Global Express Envelopes, Express Mail Int, Express Mail Int Flat Rate Env, Priority Mail International, Priority Mail Int Flat Rate Env, Priority Mail Int Flat Rate Small Box, Priority Mail Int Flat Rate Med Box, Priority Mail Int Flat Rate Lrg Box, First Class Mail Int Lrg Env, First Class Mail Int Package, First Class Mail Int Letter', 'Select the international services to be offered:', '6', '15', 'zen_cfg_select_multioption(array(\'Global Express\', \'Global Express Non-Doc Rect\', \'Global Express Non-Doc Non-Rect\', \'Global Express Envelopes\', \'Express Mail Int\', \'Express Mail Int Flat Rate Env\', \'Priority Mail International\', \'Priority Mail Int Flat Rate Env\', \'Priority Mail Int Flat Rate Small Box\', \'Priority Mail Int Flat Rate Med Box\', \'Priority Mail Int Flat Rate Lrg Box\', \'First Class Mail Int Lrg Env\', \'First Class Mail Int Package\', \'First Class Mail Int Letter\'), ',  now())");
    Be sure to follow the steps of:
    1 Save your settings to USPS shipping module

    2 REMOVE the USPS shipping module

    3 INSTALL the USPS shipping module

    4 Reconfigure the USPS shipping module
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,631
    Plugin Contributions
    6

    Default Re: UPDATE: USPS January 4, 2010

    For some people, USPS is not recognizing 5 digits as 5 digits where it should see as 5 digits:
    .12345
    1.2345
    12.345

    this is not consistently ...

    Until they are using 5 digits as 5 digits, you may need to change the calculation on the ounces from:
    Code:
        $shipping_ounces = (16 * ($usps_shipping_weight - floor($usps_shipping_weight)));
        // usps currently cannot handle more than 5 digits on international
        $shipping_ounces = zen_round($shipping_ounces, 3);
    to read:
    Code:
        $shipping_ounces = (16 * ($usps_shipping_weight - floor($usps_shipping_weight)));
        // usps currently cannot handle more than 5 digits on international
        $shipping_ounces = zen_round($shipping_ounces, 2);
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 

Similar Threads

  1. USPS and UPS shipping module update
    By ::AnanA:: in forum Built-in Shipping and Payment Modules
    Replies: 128
    Last Post: 1 Oct 2010, 10:05 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
  •