Magento broken USPS shipping rates after January 4, 2010

Our great USPS decided to make some slight name changes to their delivery methods. So you need to change a core file
app/code/core/Mage/Usa/etc/config.xml

You'll need to change any instance of 'First Class' -> 'First-Class' and get ride of '(EMS)'

<usps>
    <active>0</active>
    <sallowspecific>0</sallowspecific>
    <allowed_methods>Bound Printed Matter,Express Mail,Express Mail Flat-Rate Envelope,Express Mail Flat-Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International,Express Mail International (EMS) Flat-Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First Class Mail International Large Envelope,First Class Mail International Letters,First Class Mail International Package,First Class,First Class Mail,First Class Mail Flat,First Class Mail International,First Class Mail Letter,First Class Mail Parcel,Global Express Guaranteed,Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Flat-Rate Box,Priority Mail Flat-Rate Envelope,Priority Mail International,Priority Mail International Flat-Rate Box,Priority Mail International Flat-Rate Envelope,Priority Mail International Large Flat-Rate Box,Priority Mail Large Flat-Rate Box,USPS GXG Envelopes</allowed_methods>
    <container>VARIABLE</container>
    <cutoff_cost></cutoff_cost>
    <free_method></free_method>
    <gateway_url>http://production.shippingapis.com/ShippingAPI.dll</gateway_url>
    <handling></handling>
    <machinable>true</machinable>
    <methods>Bound Printed Matter,Express Mail,Express Mail Flat-Rate Envelope,Express Mail Flat-Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International (EMS),Express Mail International (EMS) Flat-Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First Class Mail International Large Envelope,First Class Mail International Letters,First Class Mail International Package,First Class,First Class Mail,First Class Mail Flat,First Class Mail International,First Class Mail Letter,First Class Mail Parcel,Global Express Guaranteed,Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Flat-Rate Box,Priority Mail Flat-Rate Envelope,Priority Mail International,Priority Mail International Flat-Rate Box,Priority Mail International Flat-Rate Envelope,Priority Mail International Large Flat-Rate Box,Priority Mail Large Flat-Rate Box,USPS GXG Envelopes</methods>
    <model>usa/shipping_carrier_usps</model>
    <size>REGULAR</size>
    <title>United States Postal Service</title>
    <userid backend_model="adminhtml/system_config_backend_encrypted"/>
    <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
    <max_package_weight>70</max_package_weight>
    <handling_type>F</handling_type>
    <handling_action>O</handling_action>
</usps>

change to

<usps>
    <active>0</active>
    <sallowspecific>0</sallowspecific>
    <allowed_methods>Bound Printed Matter,Express Mail,Express Mail Flat-Rate Envelope,Express Mail Flat-Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International,Express Mail International (EMS) Flat-Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First-Class Mail International Large Envelope,First-Class Mail International Letters,First-Class Mail International Package,First-Class,First-Class Mail,First-Class Mail Flat,First-Class Mail International,First-Class Mail Letter,First-Class Mail Parcel,Global Express Guaranteed,Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Flat-Rate Box,Priority Mail Flat-Rate Envelope,Priority Mail International,Priority Mail International Flat-Rate Box,Priority Mail International Flat-Rate Envelope,Priority Mail International Large Flat-Rate Box,Priority Mail Large Flat-Rate Box,USPS GXG Envelopes</allowed_methods>
    <container>VARIABLE</container>
    <cutoff_cost></cutoff_cost>
    <free_method></free_method>
    <gateway_url>http://production.shippingapis.com/ShippingAPI.dll</gateway_url>
    <handling></handling>
    <machinable>true</machinable>
    <methods>Bound Printed Matter,Express Mail,Express Mail Flat-Rate Envelope,Express Mail Flat-Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International (EMS),Express Mail International (EMS) Flat-Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First-Class Mail International Large Envelope,First-Class Mail International Letters,First-Class Mail International Package,First-Class,First-Class Mail,First-Class Mail Flat,First-Class Mail International,First-Class Mail Letter,First-Class Mail Parcel,Global Express Guaranteed,Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Flat-Rate Box,Priority Mail Flat-Rate Envelope,Priority Mail International,Priority Mail International Flat-Rate Box,Priority Mail International Flat-Rate Envelope,Priority Mail International Large Flat-Rate Box,Priority Mail Large Flat-Rate Box,USPS GXG Envelopes</methods>
    <model>usa/shipping_carrier_usps</model>
    <size>REGULAR</size>
    <title>United States Postal Service</title>
    <userid backend_model="adminhtml/system_config_backend_encrypted"/>
    <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
    <max_package_weight>70</max_package_weight>
    <handling_type>F</handling_type>
    <handling_action>O</handling_action>
</usps>

Of course you'll want to reload your cache and then you need to reselect the methods in System > Configuration > Shipping Methods > USPS > Allowed Methods

Screen shot 2010-01-18 at 9.39.17 AM.png

References:
http://www.magentocommerce.com/boards/viewthread/15659/#t203165

Comments

Hi Shane I am integrating

Hi Shane

I am integrating USPS api for my site and everytime I receive message as "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us." in all browsers. I tried your trick but it did not work. Any idea what I am doing wrong ? Please let me know.

Thanks in advance.
Anil Gupta

Thanks you. Thanks you.

Thanks you. Thanks you. Thanks you. Thanks you.... YES you!!
After weeks of grueling aggravation, you have finally saved me.

Anil, Did you have USPS

Anil,

Did you have USPS working before January 4th? If not then it may be something else. Enable all the methods of delivery and see if it works. This change only affected some methods, so if all of them are enabled you should see something returned if your USPS is set up correctly.

-Shane

Thanks for saving the

Thanks for saving the aggravation levels! But...one question. You say to get rid of "(EMS)", but your fixed example still shows it. Or am I missing something? Thanks!

Yes, get rid of " (EMS)".

Yes, get rid of " (EMS)". worked for me. Thanks for this page!

I would like to add a box

I would like to add a box similar to yours...

"Taxes and Duties not included, etc." What is the best way to add this?

Thanks!
-brian

Here is part of the

Here is part of the file
app/design/frontend/default/default/template/checkout/cart/shipping.phtml

<form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>">
    <fieldset>
        <dl class="sp-methods">
            <?php foreach ($_shippingRateGroups as $code => $_rates): ?>
                <dt><b><?php echo $this->getCarrierName($code); ?></b></dt>
                <dd>
                    <ul>
                    <?php foreach ($_rates as $_rate): ?>
                        <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>>
                           <?php if ($_rate->getErrorMessage()): ?>
                                <?php echo $_rate->getErrorMessage() ?>
                           <?php else: ?>
                                <input name="estimate_method" type="radio" value="<?php echo $this->htmlEscape($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
                                <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
                                <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
                                <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
                                <?php echo $_excl; ?>
                                <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
                                    (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
                                <?php endif; ?>
                                </label>
                           <?php endif ?>
                        </li>
                    <?php endforeach; ?>
                    <?php if("usps" == $code) echo '<div class="usps-disclaimer">Duties and Taxes not included.<br>Tracking only guaranteed on <u>Express Mail International</u>.</div>'; ?>
                    </ul>
                </dd>
            <?php endforeach; ?>
        </dl>
        <div class="buttons-new">
            <input type="image" src="/skin/frontend/default/aero/images/update_total.png" value="Submit" alt="Update Total">
        </div>
    </fieldset>
</form>

You'll also need to style it using CSS.

Hello, anyone having problem

Hello, anyone having problem with integrating USPS Express Mail International on Magento v1.4? I can't make it to work... and the release logs said it has already been fixed. Please advice...

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal5>, <drupal6>, <javascript>, <php>, <sql>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options