2011 Shipping Rates Not Working

With the USPS updating it’s rates today many of the existing shipping services no longer work such as Media Mail, First-Class International and Priority International. Does anyone know of a way to fix these?

just noticed I posted this in the wrong section, feel free to move it to the appropriate section

We’re having problems with Priority Mail International rates not showing up.



Evidently USPS has made a change to the name of the service (or similar coding change) which is causing the problem. This has happened before.

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

Here’s the bug report that someone else has already made.

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

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.

just FYI, that bit of code didn’t work to solve anything.



Wwhen I am in the admin and I run a test of the rates using the Test link, the pop-up window shows this:



“First Class mail must weigh 13 ounces or less. / Service not available.”



Both Media Mail and Parcel are showing the same message - as if it is attempting to calculate them as First Class even though they aren’t.



I can’t really blame CS Cart since it is the USPS which caused this, but since it is a major issue I am hoping it is resolved soon! :o

We also see this problem with International Shipping. We need this fixed asap, does anyone have solutions?



Milezone

Someone posted a fix in another thread that made my Priority Mail International start working again.

[url]http://forum.cs-cart.com/showpost.php?p=106270&postcount=12[/url]



I’ll test glukkkk’s fix later today, but it looks to do the same thing with slightly different code.