On July 28, 2013, the United States Postal Service (USPS) rolled-out changes to their API that impact you if your Magento Community Edition store is using USPS Priority or Express shipping methods. If this is the case, it’s important to update your Magento CE store right away with the patch that Magento has made available for versions 1.4.x through 18.104.22.168 at:
The shipping methods patch will also need to be applied for versions earlier than 1.7 if it hasn’t been applied already. You can download the patch from the above links and then upload it via FTP, but it’s easier to just grab the patch via wget after you have logged in via SSH. If you don’t have shell access on your account with us yet, you’ll need it to run the patch(es) and so please contact support to have it enabled.
Once you are logged in via SSH:
- Change directory to the root of your Magento install (yourdomain.com/html)
- Right click on link of the patch you need at http://www.magentocommerce.com/blog/comments/magento-community-edition-alert-important-patch-for-usps-api/ and then open it in a new tab or window.
- Copy the URL, leaving off the part of the URL following ‘patch’ or ‘sh’, and then run: wget <link> in your SSH terminal.
for the link: http://info.magento.com/rs/magentocommerce/images/MAGEBP-706_CE_22.214.171.124_v4.patch?icid=BLOG_uspsceapi_sixtwoship
Then run the .patch files with:
patch –p0 < patch_file_name.patch
and the .sh files with:
patch -p0 < MAGEBP-706_CE_126.96.36.199_v4.patch sh PATCH_SUPEE-1868_CE.188.8.131.52_v1.sh
It’s recommended to run the changes by your developer first before applying the patch, and/or test it on a development site first before taking it live.
One issue I’ve seen so far is the API upgrade patch throws an error because the core files it tries to modify were already modified from the original ones for that version*. the patch tries to modify the following files:
app/code/core/Mage/Paypal/Model/Express/Checkout.php app/code/core/Mage/Usa/Helper/Data.php app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps/Source/Method.php app/code/core/Mage/Usa/etc/config.xml app/code/core/Mage/Usa/sql/usa_setup/upgrade-184.108.40.206.1.1-220.127.116.11.1.2.php
If you do get an error because these core files were modified, you can download a clean version of the same version of Magento from their site, find the core files you modified, and copy them over to the correct directories so you have the originals back in place before running the patch. This is a good example of why Magento core files in app/code/core shouldn’t be modified, as upgrades and patches can run into errors. If your developer needs to modify core files, it’s a good to first copy them to app/code/local and then make needed changes.
If you need any assistance with running the patch, or need shell access enabled, just let our support team know!