7 replies [Last post]
motoservo's picture
Offline
Joined: 05/13/2008
Juice: 11
Was this information Helpful?

I'm running Ubercart with the UPS module in a stock theme. I only get the default error message instead of an actual quote. I've been hammering at this for going on two days now.

Things I've tried:
- I believe by now read all pertinent threads on this forum.
- I've tried several different access keys and even a different UPS account.
- I've tried multiple computers using different browsers FF on mac and IE on Windows.
- I've tried from a remote server. So far nothing seems to help.
- I read the logs but watchdog is not reporting anything related to this issue.
- I read the Firebug console and it reports only 4 characters returned from the ajax call: "[ ]".

I read a post here from a user with the same issue and, for that user, the resolution was to change the pref from to "small packages". This did not resolve my issue.

If anyone has any tips I'd very much appreciate it.

**I don't know my version number but this Drupal & Ubercart installation is only a month old.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6855
Re: UPS module not getting shipping quotes - ajax returns empty

Does turning on the debug output in the Shipping quote settings show anything? Are the UPS method and its corresponding Workflow-ng configuration enabled? What does Firebug show as the POSTed information to the shipping quotes URL?

motoservo's picture
Offline
Joined: 05/13/2008
Juice: 11
Re: Re: UPS module not getting shipping quotes - ajax returns em

The workflow-ng and UPS modules are both enabled. I have only one delivery type enabled for UPS but I've tried several permutations of that preference.

It doesn't appear to me that the right function is being called for a shipping quote. I added an error_log() function at the top of all UPS functions in the UPS module with the name of the UPS function as the argument. Here is the list of functions that were called when I tried to get a shipping quote:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-ERROR LOG
Tuesday, May 13, 2008 9:12:37 PM US/Central
[Tue May 13 21:12:39 2008] [error] [client ::1] uc_ups_menu, referer: http://localhost/rmm/trunk/duckbill/cart/checkout
[Tue May 13 21:12:39 2008] [error] [client ::1] uc_ups_shipping_method, referer: http://localhost/rmm/trunk/duckbill/cart/checkout
[Tue May 13 21:12:39 2008] [error] [client ::1] _uc_ups_service_list, referer: http://localhost/rmm/trunk/duckbill/cart/checkout
[Tue May 13 21:12:39 2008] [error] [client ::1] _uc_ups_pkg_types, referer: http://localhost/rmm/trunk/duckbill/cart/checkout
[Tue May 13 21:12:39 2008] [error] [client ::1] uc_ups_nodeapi, referer: http://localhost/rmm/trunk/duckbill/cart/checkout
[Tue May 13 21:12:39 2008] [error] [client ::1] uc_ups_shipping_type, referer: http://localhost/rmm/trunk/duckbill/cart/checkout
[Tue May 13 21:12:39 2008] [error] [client ::1] uc_ups_shipping_method, referer: http://localhost/rmm/trunk/duckbill/cart/checkout
[Tue May 13 21:12:39 2008] [error] [client ::1] _uc_ups_service_list, referer: http://localhost/rmm/trunk/duckbill/cart/checkout
[Tue May 13 21:12:39 2008] [error] [client ::1] _uc_ups_pkg_types, referer: http://localhost/rmm/trunk/duckbill/cart/checkout

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-HEADERS
Here is the info posted in the ajax call as well as the headers from both call and response:
Response Headers
Date Wed, 14 May 2008 02:21:09 GMT
Server Apache/2.2.8 (Unix) DAV/2 PHP/5.2.5
X-Powered-By PHP/5.2.5
Expires Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified Wed, 14 May 2008 02:21:09 GMT
Cache-Control store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Length 4
Keep-Alive timeout=5, max=100
Connection Keep-Alive
Content-Type text/javascript; charset=utf-8
Request Headers
Host localhost
User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5
Accept HTTP Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Content-Type application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With XMLHttpRequest
Referer http://localhost/rmm/trunk/duckbill/cart/checkout
Content-Length 461
Cookie SESSb386a9027316fca55bbe6082fba3b4e2=11b64e7f60c5cad22a99670bee881c22; SESSd69f59dbe4f20cdf615cdd72d2ff4f86=20d75acfb661bb4138c3be7ecea3f524; PHPSESSID=06285b4457e7c5a75e550b8c0eb28adc

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-POST
uid=1&details[address_select]=0&details[country]=840&details[zone]=&details[first_name]=&details[last_name

]=&details[company]=&details[street1]=&details[street2]=&details[city]=&details[postal_code]=&details

[phone]=&products=9%255EDuckbill%2BMoney%2BClip%255EDB01%255E%255E2%255E5.00%255E33.00%255E1%255Ea%253A2

%253A%257Bs%253A6%253A%2522module%2522%253Bs%253A10%253A%2522uc_product%2522%253Bs%253A9%253A%2522shippable

%2522%253Bs%253A1%253A%25221%2522%253B%257D

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-RESPONSE
[ ]

You reply is SO appreciated!
Troy Dalmasso

motoservo's picture
Offline
Joined: 05/13/2008
Juice: 11
Re: Re: UPS module not getting shipping quotes - ajax returns em

I just replied and I wanted to edit my reply but the post is flagged for admin approval. I wanted to add that the "debug output" is enabled but still nothing appears in the logs. There is lots more in the post that you will see once unflagged.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6855
Re: Re: Re: UPS module not getting shipping quotes - ajax return

Heh, the spam filter saw all those links to localhost and decided you were evil. Evil

Edit away.

motoservo's picture
Offline
Joined: 05/13/2008
Juice: 11
functions called?

So shouldn't uc_ups_quote() or uc_ups_shipping_quote() be called during a quote request?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6855
Re: functions called?

It's not being called from /cart/checkout, so I don't think you'd see it there. It gets called during the AJAX request to /cart/checkout/shipping/quote.

I would put some drupal_set_message() statements in that function to see what's going inside it. After you get a shipping quote, refresh the page to see the messages.

motoservo's picture
Offline
Joined: 05/13/2008
Juice: 11
Well, lots to report. First

Well, lots to report.

First off, the functions I included were each on the top line of the UPS defined functions. The functions simply reported the name of the function as it was being called. So no matter where a the functions are called from, they are logged into my error log as it is called (even during the ajax call). Now that everything works the quote and shipping_quote functions are both being called as expected.

After reading your first reply more carefully, I went and read through more of the workflow-ng settings. It was then that I realized that the rules were there but were set as "not active". It was a different developer who set up the installation and he didn't realize there was more to do to configure besides enabling the workflow_ng module. Even in your first question to me I assumed when you said "is the UPS and Workflow_ng configuration enabled?" I thought you meant was the module itself enabled.

I wonder if there could be improvements to your installation instructions so that it is really clear that the module needs to be enabled and THEN the rules set to active.

Anyway, its just a suggestion. Thanks for your replies and for your hard work on the module (assuming its your baby).

-=-
Troy Dalmasso