Get the book

Go Back   Zen Cart Support > News and Announcements > Zen Cart Release Announcements

Zen Cart Release Announcements Watch this forum for new releases and other important announcements.
Click here to subscribe to these announcements.

Closed Thread
 
Thread Tools Display Modes
Old 4th January 2010, 08:28 PM   #1
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
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
File Type: zip USPS_UPDATE_2010_0104.zip (10.0 KB, 1393 views)
__________________
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

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.3.9f]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Old 6th January 2010, 06:38 AM   #2
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
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

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.3.9f]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Old 9th January 2010, 09:41 PM   #3
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
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
File Type: zip USPS_UPDATE_2010_0104_B.zip (10.0 KB, 1008 views)
__________________
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

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.3.9f]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Old 12th January 2010, 02:58 PM   #4
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
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

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.3.9f]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Old 28th January 2010, 11:24 PM   #5
Ajeh
Oba-san
 
Ajeh's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
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

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.3.9f]
Officially PayPal-Certified! Just click here
Ajeh is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
USPS and UPS shipping module update ::AnanA:: Built-in Shipping and Payment Modules 117 2nd August 2010 12:35 AM


All times are GMT +1. The time now is 09:34 AM.

Learn tips, tricks & secrets for your Zen Cart™
Sign up for our FREE Newsletter

Powered by vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content and Graphics Copyright (c) 2006, 2007, 2008, 2009, 2010 Zen Ventures, LLC - all rights reserved
Get Zen Cart E-Commerce Shopping Cart at SourceForge.net. Fast, secure and Free Open Source software downloads