Forums / General Questions / Did UPS update anything?

Did UPS update anything?

Locked

Views: 661

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
29 Oct 2008, 7:11 PM
#1
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Did UPS update anything?

Anyone know if UPS updated anything on their end which could mess up the UPSXML shipping module?

One of our customers contacted us from Brazil, saying that when he proceeded to the checkout area, there was nothing but a WHITE screen. I looked at our debug log file and saw the following:

[29-Oct-2008 13:59:25] PHP Fatal error: Cannot use string offset as an array in /home/user/public_html/store/includes/modules/shipping/upsxml.php on line 262

So I went to that file (upsxml.php) and saw the following function which was throwing the error:

if (isset($this->servicesTimeintransit[$type])) {
$eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
$months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$eta_arrival_date = $months[(int)$eta_array[1]]." ".$eta_array[2].", ".$eta_array[0];
// $_type .= ", ETA: ".$eta_arrival_date;
$_type .= "";
}

I don't know what could have possibly changed to cause this, but we certainly didn't do anything. So I commented that function out and now it APPEARS to be working. If you do hear any information about a UPS code change, please let us know.

  • Jeff
29 Oct 2008, 7:33 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Did UPS update anything?

I suspect the quote came back without a time component ... perhaps just an instructional/error message.
When was the last time you got a quote for the same destination address but didn't get an error?
What happens if you plug in that customer's shipping address into the UPS website rate-calculator? How do the quotes compare with other quotes in terms of data available etc?
The problem might be locale-specific.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.