USPS changes in 2011

Just received this email; will this directly affect us or will something need to be done by the CS-Cart programmers?


[quote]On January 2, 2011, USPS will update domestic shipping services and international pricing and product features. For detailed information on prices and new product features, please reference the Federal Register Notice at [url]http://pe.usps.com/FederalRegisterNotices.asp#Jan_2011_Prices[/url].



For a list of the new prices, please reference the Postal Explorer website at [url]http://pe.usps.com/[/url]. The information is on the left hand side under “NEW* Jan. 2, 2011 Pricing Information”



Price Change updates will be available in the Web Tools testing environment for integrator access on or around December 13. The test environment can be accessed, using your production UserID, via the following URL scheme, host and path:



Secure APIs: [url]https://stg-secure.shippingapis.com/ShippingApi.dll[/url]

Non-secure APIs: [url]http://stg-production.shippingapis.com/ShippingApi.dll[/url]

Please note that the changes below are intended to be backwards compatible, however, may not be depending on how individual programs are integrated with the APIs. Technical guides, inclusive of the changes below, can be obtained from the USPS Internet Customer Care Center (1-800-344-7779 or icustomercare@usps.com).



Web Tools APIs will be affected in the following manner:

§ All Web Tools APIs with postage prices incorporated will be updated to reflect the price changes

§ All Rate Calculator API integrators are encouraged to migrate to the latest API versions (RateV4, IntlRateV2):

o RateV4 and IntlRateV2 will be the only Rate Calculator API versions to offer the full range of new products and functionality



o Rate, RateV2, RateV3 and IntlRate will be retired in May 2011, requiring all integrators to migrate to the latest versions



§ Domestic Rate Calculator API Changes

o New request enumerations will be added to RateV4 to support the USPS product offerings and prices listed in the Federal Register Notice



o New response nodes in Rate, RateV2, RateV3 and RateV4 to support the USPS product offerings and prices listed in the Federal Register Notice



o New optional request values in RateV4 to support USPS extra services offerings and prices

o New optional response nodes in RateV4 to support USPS extra services offerings and prices

§ International Rate Calculator API

o New response nodes in IntlRate and IntlRateV2 to support the USPS product offerings and prices listed in the Federal Register Notice



o New optional request values in IntlRateV2 to support USPS extra services offerings and prices

o New optional response nodes in IntlRateV2 to support USPS extra services offerings and prices

o New response value in IntlRate and IntlRateV2

§ Express Mail Label and Hold For Pickup Express API

o New and request data tags to support the Legal Flat Rate Box

o New , , , and request data tags

§ Delivery Confirmation and Signature Confirmation

o New and request data tags to support the USPS product offering and prices listed in the Federal Register Notice



§ International Label APIs

o New request enumerations will be added to support the USPS product offerings and prices listed in the Federal Register Notice



o New , , , , and request data tags

o New response value

§ Customs Forms CN22 and CP72

o New response value

Please contact the USPS Internet Customer Care Center with any questions or concerns at 1-800-344-7779 or icustomercare@usps.com.


  • Web Tools Program Office[/quote]

Shouldn’t be an issue if you use realtime quotes. If you use manual, then you probably want to review your charges.

Evidently what has happened before is happening again.

[url]http://forum.cs-cart.com/showthread.php?t=14886[/url]



Domestic Priority Mail real-time rates are working for us, however Priority Mail International is not. As evidenced by a few Google searches, a number of other carts are having the same problem this year. Looks to be a change by USPS in the name of the service.



Does anyone have any ideas on how to resolve this?

You should put this in as a bug report.

CS-CART should supply a fix.

Seems like others are having a problem, but not reported as a bug.

Bob

Same here. All my International realtime shipping rates are not working. Media Mail for US orders is not working either…

My International realtime shipping rates are no longer working. Media Mail for US orders is not working either.



I submitted a bug report.

Same problem. USPS International realtime rates are no longer working. Either is US Media Mail.



Bug reported. Hopefully this can be corrected soon.

Can you post a link to the bug tracker request so we can follow the progress? I tried searching for it but only found a similar request from 2010.

[quote name=‘asmith’]Can you post a link to the bug tracker request so we can follow the progress? I tried searching for it but only found a similar request from 2010.[/QUOTE]



[url]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=2360[/url]

I believe Media Mail has been discountinued…

In the past I’ve been able to go through PHP MyAdmin and change the usps_code to the latest, but it doesn’t seem to be working this time with what I’ve tried.



Any one know what the new usps_code should be for Express Mail International?

To fix this problem, you need to add the registered trademark to the services.



OLD: Priority Mail International

NEW: Priority Mail® International



You can update your shipping services names (the cscart_shipping_services table) or just filter out the trademark in the code. I just added this to my usps.php file for domestic and international:


$service_name = str_replace('®', '', $service_name);

That worked for me Larry, thanks. For those like me who weren’t sure exactly where to paste the code, for Priority Mail International you want to find

} else {
if ($shipment[$i]->getElementByName("Postage")) {
$service_name = $shipment[$i]->getValueByPath("/SvcDescription");
$rate = $shipment[$i]->getValueByPath("/Postage");
}
}




and add Larry’s code below the line that begins with $service_name =

} else {
if ($shipment[$i]->getElementByName("Postage")) {
$service_name = $shipment[$i]->getValueByPath("/SvcDescription");
$service_name = str_replace('®', '', $service_name);
$rate = $shipment[$i]->getValueByPath("/Postage");
}
}

[quote name=‘sculptingstudio’]To fix this problem, you need to add the registered trademark to the services.



OLD: Priority Mail International

NEW: Priority Mail® International



You can update your shipping services names (the cscart_shipping_services table) or just filter out the trademark in the code. I just added this to my usps.php file for domestic and international:


$service_name = str_replace('®', '', $service_name);[/quote]



Thanks for your help!

There is a well-known problem with USPS shipping services in CS-Cart, it is related to the changes made on the USPS side recently. To resolve the problem, add the following part of the code:



```php // Decode HTML entities and remove any text between the tags

$service_name = preg_replace(‘/<.+?>.?/i’, ‘’, html_entity_decode($service_name));

// Remove any symbols except the letters and “-” symbol

$service_name = preg_replace(‘/[^A-Za-z -]/i’, ‘’, html_entity_decode($service_name)); ```

below this one:

```php $service_name = $shipment[$i]->getValueByPath(“/Postage/MailService”); ```

and this one:

```php // Decode HTML entities and remove any text between the tags

$service_name = preg_replace('/<.+?>.
?/i’, ‘’, html_entity_decode($service_name));

// Remove any symbols except the letters and “-” symbol

$service_name = preg_replace(‘/[^A-Za-z -]/i’, ‘’, html_entity_decode($service_name)); ```

below this one:

```php $service_name = $shipment[$i]->getValueByPath(“/SvcDescription”); ```



in the “usps.php” file located in the “shippings” directory of your CS-Cart installation.

When I put this fix in and run the TEST link under Priority Mail International it still keeps saying the error of “Invalid First Class Mail Type. / Service not available” – it say the same thing under my first class test with .5 pound.



Any ideas? Do I have to pay to upgrade to 2.1.0 since i’m only on 2.0.15?



James

http://www.RPGShop.com

[quote name=‘gamegoblin’]When I put this fix in and run the TEST link under Priority Mail International it still keeps saying the error of “Invalid First Class Mail Type. / Service not available” – it say the same thing under my first class test with .5 pound.



Any ideas? Do I have to pay to upgrade to 2.1.0 since i’m only on 2.0.15?



James

http://www.RPGShop.com[/QUOTE]



That’s because the default address in your admin profile and the sample address is probably not international. This is a default for US address, check under the “General” tab set the location to international. It should work then.



By the way the fix above worked! Thank you very much; was wondering why the customers overseas couldn’t see a shipping rate!

I have a customer who is using an older version of Cs-Cart, version: 1.3.5-SP4. This fix doesn’t appear to be working for me. Does anyone have any ideas?

pbradish posted fix corrected USPS Priority Mail, but did not fix First-Class International.



glukkk posted fix for 2.1.x worked, but Express Mail International still failed to fetch a rate from USPS.

I found that CS-Cart still had the incorrect value for Express Mail International in the database table ‘cscart_shipping_service’.

Find Express Mail International (EMS) in the code field fo the table and remove the value “(EMS)” from the code field, leaving the value just “Express Mail International” and Express Mail International now returns a rate.



I suggest that you skip the fix posted by pbradish and apply the fix posted by glukkk. If you need to ship USPS Express Mail International, you will need to fix the name in the code field of the database I explained above.



@bitwizard,

Did you update the values of the service names I indicated in this thread?:

[url]http://forum.cs-cart.com/showthread.php?t=14886[/url]

Found and fixed. I didn’t have to make any db changes, Express Mail International options show up just fine for me.