USPS Parcel Post (Parcel Machinable)

To all:



If anyone is having an issue with getting Parcel Post (Parcel Machinable in CsCart lingo) I was able to get a solution from support during my free 30 day support.



Here’s the fix:



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. I have added the following part of the code:


// 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:


$service_name = $shipment[$i]->getValueByPath("/Postage/MailService");



and this one:


// 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:


$service_name = $shipment[$i]->getValueByPath("/SvcDescription");



in the “usps.php” file located in the “shippings” directory of your CS-Cart installation, so, it seems that the problem has been resolved.