You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi,
I have an issue with using 9 digit postal codes. It seems the UPS real-time calculator doesn't recognize the dash or 9 digits and doesn't provide the shipping options when ordering. The following appears:
"There is one shipping option available, Standard Carrier. The cost associated with this shipping method is $0.00."
How do I fix this issue?
Thanks in advance for your response.
This is a known issue with CCP4 that will be resolved in CCP5. Until you can upgrade, edit the file:
./cgi-bin/library/modules/site_store_ship_dis.pl
Try editting the Perl code to chop off any digits after 5. You'll need to issue a 'length' then an 'if', 'substr' in the if to get this done.
Replace:
### CUT
@ups_services_lines = getUPS($ups_services_code,$shipping_origin_zip,$shipping_destination_zip,$shipping_weight,$shipping_destination_country,$shipping_rate_chart,$shipping_length,$shipping_width,$shipping_height,$shipping_oversized,$shipping_cod);
### CUT
with the following:
### CUT
$shipping_destination_zip_length = length($shipping_destination_zip);
if ($shipping_destination_zip_length > "5") {
$shipping_destination_zip = substr($shipping_destination_zip, 0, 5);
}
@ups_services_lines = getUPS($ups_services_code,$shipping_origin_zip,$shipping_destination_zip,$shipping_weight,$shipping_destination_country,$shipping_rate_chart,$shipping_length,$shipping_width,$shipping_height,$shipping_oversized,$shipping_cod);
### CUT
Offline
Thanks that did the trick!