Magento – UPS Shipping Integration

This walkthrough is to help with UPS Shipping integration in Magento.  So you got your website all developed and your ready to start integrating your shipping options for Magento.  One of the most common shipping companies, UPS or United Parcel Service, has two options to choose from when you enter the menu.  The defualt option under UPS type is United Parcel Service.  But if you click the drop down menu it will show United Parcel Service XML.

 

UPS Shipping Integration Standard Option

You can leave the standard option highlighted however if you have negotiated rates with UPS it will not show those to your clients.  Furthermore it will use an estimator feed that tends to be to expensive compared to the true cost of shipping.  If you are not concerned with this leave the setting be and you are all set.  However if you want to give your clients the most accurate rates keep reading.

 

UPS Shipping Integration XML Option

To setup the XML option you will need to attain a UPS shipping account.  You can get one by clicking here: UPS.  Now that you have your brand new account you will need to attain some information hidden within the many menu options at UPS.com.  To help you reach the correct page that will contain the link to your API settings if you are logged into your account click here.  You need 4 pieces of information from UPS to make your negotiated rates work.   They are:

  • Access license number: YOUR ACCESS KEY
  • Password: Your UPS Account Password
  • UserId: Your UPS User ID
  • Shipper Number: Your Shipping Number (6 Digits)

Once you have this information ready follow the menu instructions below to navigate in Magento to where you need to be.
Magento “hides” this behind a special dropdown named “United Parcel Service XML” in the UPS section of the “Shipping Settings” Here’s the steps to setting up the UPS login:

  • Verify you have a UPS.com “XML Access Key”, which is NOT a “Developers Key”.  If you have questions call into UPS and get the correct account setup.(1-800-742-5877)
  • In the Magento Admin, click System → Configuration → Shipping Methods → UPS
  • Key Settings:

Once all the required info is in place, you should have your custom UPS rates.  If not you either misentered information, don’t have XML key access, or do not have all of your options correctly setup….

Or it is possible that due to your setup you may need to do some “modifications”.  UPS SSL will create errors in certain circumstances which may create the need for you to modify some core files.  Only use this after you are positive that you entered all your information in correctly and you do have the correct account through UPS.

 

**FIX BY CORE FILE MODIFICATION**

After much headache it appears that in certain circumstances there may be an issue with the SSL UPS uses the curl option will fail.  Never fear, here is the solution.

Copy the file “/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php” to “/app/code/local/Mage/Usa/Model/Shipping/Carrier/Ups.php” and find the following code (there should be four instances):

$xmlResponse = curl_exec ($ch);

And add this right before it:

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

 

 

ideaforge

Share
Published by
ideaforge

Recent Posts

Magento 2 – As a Platform for E-Commerce

Magento 2 is a expansive, flexible, and modifiable e-commerce system. It offer an myriad of…

7 years ago

Moving Domain Names Correctly with 301 Redirects (The Easy Way)

WHAT IS A 301 REDIRECT? A 301 redirect is a way of allow search engines…

8 years ago

How to Edit Cherry Options’ Social Icons

In order to change the icon images, you need to replace the default .png files with…

11 years ago