UPSXML Shipping Module for Zen Cart 1.5.3 and later

Version 1.7.9, by lat9

Current Support Thread at Zen Cart Forums: https://www.zen-cart.com/showthread.php?222903-UPS-XML-Support-Thread

Contributers and Copyrights


Description

This module provides the eCommerce Zen Cart community with the long-awaited XML version of the UPS Rates and Services gateway. It supports multiple (storefront) languages, multiple geographic origins and implements the most necessary features offered by the UPS Rates and Services system. The module connects to UPS, retrieves a list of available shipping methods and prices and presents them to the customer.

Settings are changed in a store's Zen Cart admin interface under Modules->Shipping>United Parcel Service (upsxml). The administrative interface shows shipper- (not customer-) related variables such as package type and origin in English, but customer-facing product names (the name UPS uses to describe its services, such as Express Plus or Ground) can be multi-lingual.


Installation

This plugin currently has no core-file overwrites; you should always backup your cart's database and files prior to making any changes.

  1. Unzip the plugin's package file, which you've most likely already done if you're reading this!
  2. Copy the plugin's new files, from the zip-file's distribution:
    1. /includes/classes/xmldocument.php
    2. /includes/languages/english/modules/shipping/upsxml.php
    3. /includes/modules/shipping/upsxml.php
    4. /includes/templates/template_default/images/icons/shipping_ups.gif
  3. If you do not already have UPS access credentials:
    1. UPS Rates account username
    2. UPS Rates account password
    3. UPS Rates Access Key
    then
    1. Register at UPS for an account: https://wwwapps.ups.com/doapp/signup?sysid=myups
    2. Once you're registered, Request an Access Key using this link: https://www.ups.com/upsdeveloperkit?loc=en_US
    3. Write down the XML Access Key; you will need that key to enable the UPS XML shipping module.
  4. Log into your Zen Cart admin and use the Modules->Shipping tool to configure and enable the shipping-module for your store's use.

Configure and Test the Shipping Module

In admin, choose Modules->Shipping and activate the new United Parcel Service (upsxml) module. Edit the module and set your service options:

  1. Enable UPS Shipping
  2. Tax Class
  3. Shipping Zone
  4. Sort order of display
  5. Pickup Method
  6. Packaging Type
  7. Customer Classification Code
  8. Shipping Origin (determines what UPS shipping-method names are displayed to the customer)
  9. Origin City (required for some countries)
  10. Origin State/Province (the two-letter ISO-3166 code)
  11. Origin Country (the two-letter ISO-3166 code)
  12. Origin Zip/Postal Code
  13. UPS Currency Code
  14. Unit Weight
  15. Unit Length
  16. Quote Type
  17. Handling Fee
  18. Enable Insurance
  19. Shipping Methods
  20. Shipping Delay
  21. UPS Rates Access Key (obtain from UPS)
  22. UPS Rates Username (obtain from UPS)
  23. UPS Rates Password (obtain from UPS)
  24. UPS Rates "Shipper Number" (obtain from UPS)
  25. UPS XML Display options (to identify whether time-in-transit and package weight are displayed to the customer).
  26. Enable debug?
  27. Test or Production Mode

If you have any questions regarding the above settings, please refer to the documentation provided to you by UPS when you signed up for and received your access key.

Once configured, make sure that the results your store receives are what you expect:

  1. Test by setting your customer destination to all sorts of different places and running through the shipping process several times. Please test thoroughly before committing to its use.
  2. If you fail to get quotes, an error message will usually tell you why. Make sure your origin information is correct and use the proper two-letter codes for your country and state/province.
  3. If you still don't get any quotes, you can enable logging which will record the request/response of the transactions and any cURL errors. Starting with v1.7, just update the shipping method's debug via your admin's Modules->Shipping, editing the upsxml module.

Version History


Credits and Early Change History

Thanks to the many other authors who laid down their efforts in contributions from which has produced this. Your efforts are greatly appreciated:

  1. Original Contribution and updates - Torin Walker
  2. Time In Transit capability - Donna Gordon
  3. Bug fixes - Fox Morrey
  4. Admin selectable methods and bug fixes - Jan Zonjee/Stuart Owens
  5. Modified for zen-cart 1.2.5d by Dennis Sayer
  6. Tested for zen-cart 1.3+ by Dennis Sayer
  7. V1.5 testing, bugfixes and installation update - Brian Gundlach
  8. small fix for zen cart 1.5.5x and future PHP compatibility - lankeeyankee

A Note from Dennis Sayer

Thank you to Torin Walker for giving this code a GNU General Public License. I have removed your comments to web sites that no longer exist. I have also changed or deleted text that is not related to zen-cart.