How to fix UPS shipping rates in Zencart

NOTICE: UPS has reverted the labels back to the original names. If you have applied the changes below and now are getting incorrect UPS rates, please revert the changes

Zencart recently had an issue where UPS shipping rates were always calculated at customer counter rates even when the RDP option was selected. Since UPS changed the label for the rate code used for the UPS pickup method, Zencart’s module now sends an incorrect label for the rate code. The online UPS tool used by Zencart’s built-in UPS module will calculate rates based on customer counter if no code is provided or if the label is not recognized.

There is only one line in one file that needs to be modified so that everything goes back to how it was working. As with any changes to files, please make sure you create a backup of the file.

The update corrects the issue since Zencart version 1.2.6. If you have an older version, please double check as we have not been able to verify. We are sure it will be the same, as this is a recent issue that is due to UPS changing the name of their label for UPS rate code.

Enough Talk, lets get to the actual fix...

Update the following file:
./includes/modules/shipping/ups.php

(NOTE: We have found the code in line 230, 290, 291 and in some cases 304. You can try jumping to any of these lines, but please be careful and identify the correct code piece)

locate and update the following code:

function _upsRate($foo) {
switch ($foo) {
case 'RDP':
$this->_upsRateCode = 'Regular+Daily+Pickup'; <----THIS IS THE CODE --]
break;

Remove the Regular+ part and just leave ‘Daily+Pickup’

Your update code should now look like this:

function _upsRate($foo) {
switch ($foo) {
case 'RDP':
$this->_upsRateCode = 'Daily+Pickup';
break;

Once you have updated the file, save your changes and confirm the rate is being quoted correctly.

If you need further assistance we can assist you at an hourly rate. We can be reached at 310-529-1806.

Copyright © 2007 - 2012
Opticnoise Solutions Group

sfy39587f11