|
|||||||
| Zen Cart Release Announcements Watch this forum for new releases and other important announcements. Click here to subscribe to these announcements. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Oba-san
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
|
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 {
Code:
class usps {
__________________
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 |
|
|
|
|
#2 |
|
Oba-san
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
|
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))); 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 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 |
|
|
|
|
#3 |
|
Oba-san
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
|
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
__________________
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 |
|
|
|
|
#4 |
|
Oba-san
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
|
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'
);
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())");
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 |
|
|
|
|
#5 |
|
Oba-san
Join Date: Sep 2003
Location: Ohio
Posts: 54,532
|
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);
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 |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |