UPS Information Quesiton.

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

I just setup an account with UPS to get the information required for setting up UPS quotes on Ubercart.

I am a little confused and when I attempt to calculate shipping on my site it doesn't come back with anything it sits on processing.

I have been given the following information from UPS so far:

My UPS User ID (That is straight foward, ubercart asks for this)

UPS Account # (Is this my UPS Shipper #?)

Your Developer's Key (I assume this is UPS Online Tools Access #)

Your XML Access Key (EDIT: Reading from http://www.ubercart.org/docs/user/311/ups_online_tool_settings I see that this is the UPS Online Tools Access # that is required)

I have spent the last hour trying to translate what UPS is giving me and what Ubercart requires.

Can someone help me out here?

I have a feeling I have the UPS Online Tools Access # and UPS Shipper # setup wrong. Any help would be much appreciated.

EDIT: I guess what I need to know is if my UPS Account # is what ubercart requires for its "UPS Shipper #" and if so I guess the quotes just take a while to process?

My login and password are set fine so that would be my only question at this point.

EDIT 2: Hours later thinking maybe the setup time would be needed although UPS says you can use it immediately I am still getting the hour glass (if you will) with shipping quotes.

- Franksta

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

Yeah, the Account # is the Shipper # that you have set up.

Everything else sounds right, so you need to look at what's happening when the quote is being calculated. The Firebug extension for Firefox works pretty well.

I'm going to guess that there's a problem with SSL on your server. All I know is that my local WAMP server doesn't have it, but the livetest does have it configured properly.

Posts: 55
Joined: 08/17/2007

I am having the same problem as kaizen.

The error firebug gives me is:

syntax error
data =

Posts: 20
Joined: 08/28/2007

I am having the same problem, but with the USPS module. I followed the instructions in this post - http://www.ubercart.org/docs/user/312/usps_web_tool_shipping_quote_setti... . (although I couldn't find the patch mentioned). Everything appears to be setup, but I never get a quote back.

Firebug says:

syntax error
http://localhost/misc/jquery.js
data =

I should add, I am testing this on a lampp system if that makes any difference.

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

Chad, you probably need to get the latest code for USPS to work correctly. I'll see if I can track down the patch file, but you'll be better served by downloading the code from the Bazaar repository.

Posts: 20
Joined: 08/28/2007

Should I update all the files or just the uc_usps? I downloaded the usps and shipping modules from bazaar and get the same issue...

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

By "shipping" do you mean uc_shipping, or uc_quote? The quote module is probably what's acting up on you. The safest bet would be to run bzr update from your ubercart directory and then going to http://yoursite.com/update.php to make sure the database is up to date. This will guarantee that everything is as up to date as possible.

Posts: 20
Joined: 08/28/2007

It would be the quote method. I actually just cleaned up the install and put on only the latest version of ubercart and all modules from the bazaar download. I still get the same issue. I have some sense that it is from the lampp setup, but I cannot imagine why that would make a difference. I'm tempted to try it on my live site, but I don't want to confuse people with two stores....

Should this work within a lampp/xampp setup? If not is there a way I can install it on my live site but block the product and catalog links from showing up for all but administrators?

I should also add that the error message in firebug changed to
a[J] has no properties
http://localhost/misc/jquery.js

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

JavaScript doesn't care what kind of server you have, just which browser it comes from.

Can you tell that there's a request to /cart/checkout/shipping_quotes? That's the AJAX request to retrieve the quotes. I'd like to know if the error is happening before or after that point. I'm encouraged that the bug is different now. I've got a little better idea of what's happening.

Posts: 20
Joined: 08/28/2007

I'm not sure I know how to debug an ajax request, but if you tell me where/how to look I will. The only other thing I see in firebug happens when I view the cart and go into the checkout page and it says "uncaught exception: Permission denied to call method Location.toString"

Never mind about that last error - it was a tmp files permissions issue. Changing the permissions fixed it - it didn't change the quote issue unfortunately...

Posts: 20
Joined: 08/28/2007

Not sure if this is helpful, but this is the full error (I'm just learning firebug too):

a[j] has no properties
e(Object details[country]=840 details[zone]=33)jquery.js (line 2)
e(Object global=true ifModified=false type=POST timeout=0)jquery.js (line 2)
quoteCallback("2043%5ETong+Ren+Therapy+Model%5Eyyhtr1000%5E%5E1%5E17%5E25%5E15%5Ea%3A3%3A%7Bs%3A10%3A%22attributes%...")uc_quote.js (line 69)
setQuoteCallbacks()uc_quote.js (line 10)
e(blur )jquery.js (line 2)
[Break on this error] eval(function(p,a,c,k,e,d){e=function(c){return(c

Posts: 331
Joined: 08/07/2007
Administrator

Chad,

With Firebug, you can view AJAX GET/POST responses in the console tab. You can expand out each result to view further information (parameters sent, HTTP headers, and the server response). Truly great extension, it is.

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

There may be something not going right with your shipping address. How do you have that set up? If you could, give me the HTML names of those form elements. I have a suspicion, but it would be strange for it not to be a problem for everybody.

Posts: 20
Joined: 08/28/2007

It seems to work when I connect from another machine to my laptop running the lampp server. Perhaps it was some sort of sessions variable? I didn't change anything, except for connecting from another computer and logging in as someone other than administrator....

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

I guess that could have been it. Glad it's working for you now.

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

Lyle,

Took me a while to get back in the swing of things, I just got back from vacation! I downloaded Firebug and when I click the quote symbol I get 2 error that comes up from "/catalog/?q=cart/checkout/shipping/quote":

jquery.js (line 2)

(1)

syntax error
initJSControl()index.cfm (line 14)
onload( )index.cfm (line 1)
[Break on this error] data =

(2)

syntax error
[Break on this error] data =

I read through the post here and I am glad to see that others issues were fixed, lets hope mine is as easy! Get back to me whenever you get a chance, I am going to see what investigating I can do on this issue.

- Franksta

Posts: 88
Joined: 08/07/2007
Bug FinderGetting busy with the Ubercode.

I had a few issues getting UPS working. It ended up I needed to select small package, and have a value in the weight field. Otherwise I would get an error.

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

I just changed the default to small packages and thought I would give it a shot (weight is always in products); added a product and put it my zip code under view cart to attempte shipping... Firebug now gives me the following errors.

POST http://oldskoolindustries.com/catalog/?q=cart/checkout/shipping/quote

POST http://oldskoolindustries.com/catalog/?q=cart/checkout/shipping/quote (875ms)jquery.js (line 2)
ParamsHeadersPostResponse
Response Headers
Request Headers

XML error: syntax error at line 3

missing ; before statement
[Break on this error] data = XML error: syntax error at line 3
jquery.js (line 2)
POST http://oldskoolindustries.com/catalog/?q=cart/checkout/shipping/quote (781ms)jquery.js (line 2)
ParamsHeadersPostResponse
Response Headers
Request Headers

XML error: syntax error at line 3

POST http://oldskoolindustries.com/catalog/?q=cart/checkout/shipping/quote (797ms)jquery.js (line 2)
missing ; before statement
[Break on this error] data = XML error: syntax error at line 3
jquery.js (line 2)
POST http://oldskoolindustries.com/catalog/?q=cart/checkout/shipping/quote (828ms)jquery.js (line 2)
missing ; before statement
[Break on this error] data = XML error: syntax error at line 3
jquery.js (line 2)

And that keeps repeating... This is honestly the last hitch, my clients site will be live as soon as I can get this shipping quote done. I have yet to figure out how I can do shipping quotes with FedEX but I filled out all the information for UPS because I figured it was documented a little better by people around the foruns here. Any help you guys could give would be unbelievably helpful, I am having trouble figuring out what these errors signify as I am more a designer than a coder.

Thank you to everyone who has helped so far as well! =)

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

I have no been able to shake this bug... Anybody have any ideas?

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

There's an option is Shipping Quote Settings that lets administrators see the debug information generated by quotes. For UPS, this includes the XML received from the quote request. If you could post that (without your password), I can probably be more helpful.

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

Bare with me here as I do not see any debugging information under Administer › Store administration › Configuration > Shipping Quote Settings however it does say that you can turn debugging on for watchdog which it is on and has been. Not know much about watchdog I assume that is under Drupal's Logs area in which I have the following options, Recent log entries, Top 'access denied' errors, etc.

The Status Report reports that everything is fine; recent logs show a few issues from old site links that no longer exists, but I don't see any Shipping errors anyway in the Logs. Am I in the right place?

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

OK, I forgot that alpha 7b didn't have that setting. Instead, you need to uncomment 3 lines in uc_ups.module: 604-606. That'll will pass the XML back to the checkout screen.

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

No wonder, I was beating my head into a wall trying to figure that one out; anyway I uncommented those 3 lines and uploaded the file... I just hit "Calculate" with a proper zip code and the bar keeps scrolling indefinately. I tried it again in checkout and again it looks like it keeps going with no results... If the XML error is suppose to come on the checkout screen this make take a while. I still get the two errors in Firebug:

XML error: syntax error at line 3

missing ; before statement
[Break on this error] data = XML error: syntax error at line 3
jquery.js (line 2)
POST http://oldskoolindustries.com/catalog/?q=cart/checkout/shipping/quote (1969ms)jquery.js (line 2)
ParamsHeadersPostResponse
Response Headers
Request Headers

XML error: syntax error at line 3

missing ; before statement
[Break on this error] data = XML error: syntax error at line 3

... but that does not seem to be that much help. Where should I go from here then?

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

OK. It looks like we're going to have to do some serious debugging.

Put

<?php
  drupal_set_message
('<pre>'. htmlentities($request) .'</pre>');
?>

after line 602, put
<?php
  drupal_set_message
('<pre>'. htmlentities($resp->data) .'</pre>');
?>

after line 603, and maybe also put
<?php
  drupal_set_message
('<pre>'. print_r($response, true) .'</pre>');
?>

after line 608.

After you do that, refresh the checkout screen, enter a valid postal code and try to calculate the shipping cost. It should still not work, so refresh the page again so we can see all the messages that were generated. There may or may not be a lot of them, but since they're long, I only want the first set of 3.

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

I left the site in on-line mode for now so you can see what I am dealing with here:

Goto:

Oldskool Industries (Dummy Product) Add the one product to the cart, View Cart or Checkout and add your zip code/address information and click Calculate (Checkout does it automatically I think after you fill in the address field).

EDIT: I did not see your newest comment so I will give that a shot as soon as I get out of class later on today. Thanks.

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

Alright we got some code now in the Recent log entries ; however it is lengthy as you mentioned. I am trying to figure out what it is that will be helpful to us lets see if this is what you are looking for, if not let me know there is more below that I have copied to a file for the time being.

<?xml version="1.0" encoding="UTF-8"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>EC11B126C4FD1E04</AccessLicenseNumber>
  <UserId>oldskool_mule</UserId>
  <Password>*********</Password>
</AccessRequest>

<?xml version="1.0" encoding="UTF-8"?>
<RatingServiceSelectionRequest xml:lang="en-US">
  <Request>
    <TransactionReference>
      <CustomerContext>Complex Rate Request</CustomerContext>
      <XpciVersion>1.0001</XpciVersion>
    </TransactionReference>
    <RequestAction>Rate</RequestAction>
    <RequestOption>rate</RequestOption>
  </Request>
  <PickupType>
    <Code>03</Code>
  </PickupType>
  <Shipment>
    <Shipper>
      <ShipperNumber>54V69F</ShipperNumber>
      <Address>
        <PostalCode>08865</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </Shipper>
    <ShipTo>
      <Address>
        <PostalCode>08880</PostalCode>
        <CountryCode></CountryCode>
      </Address>
    </ShipTo>
    <ShipFrom>
      <Address>
        <PostalCode>08865</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipFrom>
    <ShipmentWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>22</Weight>
    </ShipmentWeight>
    <Service>
      <Code>03</Code>
      <Description>UPS Ground</Description>
    </Service>
    <Package><PackagingType><Code>02</Code></PackagingType><PackageWeight><UnitOfMeasurement><Code>LBS</Code><Description>Pounds</Description></UnitOfMeasurement><Weight>22</Weight></PackageWeight><PackageServiceOptions><InsuredValue><CurrencyCode>USD</CurrencyCode><MonetaryValue>33.98</MonetaryValue></InsuredValue></PackageServiceOptions></Package></Shipment>
</RatingServiceSelectionRequest>

Below that is a bunch of META TAGS and the start of some HTML; do you want me to post that as well; it is fairly long I could just upload a .txt file with it in there for you as well.

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

That HTML probably has an error message in it, so if you can figure out what it's trying to tell us, that's what I want to know. I just hope it's not "XML parse error on line 3".

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

You caught me on the way out to my next class, here is the full error log attached via .txt file. I have to run out to my next class, I'll be back in a few hours!

AttachmentSize
errorlog.txt20.32 KB
Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

"Page not found"....I think I know your exact problem.

In uc_ups.module, there is the function uc_ups_admin_settings(). In it find, "uc_ups_connection_address" and look for the URL next to "Production". I bet it has 'https://www.ups.com/ups/app/xml'. It should be 'https://www.ups.com/ups.app/xml' (ups.app, not ups/app). That's a bug in alpha7 that I had completely forgotten about until now.

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

Interestingly enough the code we were looking for reads:

     'https://www.ups.com/ups.app.xml/' => t('Production'),

... currently. If you goto "https://www.ups.com/ups.app/xml" as you say that is corect in a browser you do get a Page not Found for that one as well. I did change the code to read "https://www.ups.com/ups.app/xml" instead and tested and found that in the log I again got a "Page not Found".

You are definatly onto something though we just need to find the right page I think!

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

Did you take off the final / when you changed it? You shouldn't because the module adds on "Rate" to the end so it sends the request to https://www.ups.com/ups.app/xml/Rate. If you look at it with your browser, you should see a white page with a little bit of technical information.

Posts: 160
Joined: 08/07/2007
Uber DonorBug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik

I've confirmed that the UPS Customer Integration Environment (CIE) does indeed work and return quotes. I am testing the Production server today and can feed back what I find. The .../ups.app.xml/ vs. .../ups.app/xml is fixed in the bazaar repository and is a red herring. I am not working in production yet even with this fix. I suspect it may be because I am useing my test dev key and not an official live key or something. The url does need to be fixed if you are using 7b package.. but you might still have problems in the production mode.

More soon (juice or no juice! *g*)

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

Blessed_Steve made me realize something that I had to triple check and thank god I did. I went to the UPS setting to see if I had it on Testing or Production (I thought it was set to production) however it was set to Testing instead. Needless to say as soon as I set it to Production I got shipping quotes and a long debugging text right in the checkout cart! haha.

Give me some time to straighten things out and I will report back on what is going on. Thanks Lyle, and Steve!

=)

Posts: 85
Joined: 08/08/2007
Uber DonorEarly adopter... addicted to alphas.Not Kulvik

Yep it was the "Testing" that was not reporting back properly because as soon as "Production" was set everything worked fine, I even went back to the original 7b file from my archive and it fired up a quote right away. I do not know what was going on with testing however I wanted it to be in production mode anyhow.

Posts: 55
Joined: 08/17/2007

I'm having a similar problem with the UPS shipping module. When I click Calculate shipping, I get:

There were problems getting a shipping quote. Please verify the delivery and product information and try again. If this does not resolve the issue, please call in to complete your order.

When I check firebug I see

POST http://localhost/demetech/store/?q=cart/checkout/shipping/quote (594ms)

When I expand this line, the Post tab contains all the info I entered on the site, but the response tab says:

[ ]

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

About the only advice I can give is to tell you to double-check all of your settings. Start at "Shipping quote settings" and check each page under it.

Specific things to check:

  • Enable logging errors to watchdog. Something might show up there.
  • That the UPS quote method is enabled. Make sure the customers' country is included.
  • Your UPS user ID and shipper numbers match.
  • You have at least one UPS service enabled (Ground, 2nd Day Air, etc.)

It's hard to be of much help when there isn't much information to go on. :-/

Posts: 55
Joined: 08/17/2007

Hey Lyle,

Sorry about the vague post earlier, I was writing up a more descriptive post but got side tracked by the boss.

Error logging errors to watchdog is enabled and no errors show up.
The UPS quote method is UPS and it is enabled.
The customer's country is included:

From firebug:
?q=cart/checkout/shipping/quote (609ms)
details[country] 840

The default pickup address is filled in and matches the information from UPS.com

Quote methods -> General Settings
UPS is checked
Small Package is set to 0
Default order fulfillment type for products: Small Package

Quote methods -> UPS
UPS Online Tools Access #: UPS sent me an email with a developers key. I used that number
UPS shipper #: I used our UPS store number, it is 6 digits and is on all of our tracking numbers
UPS user id/password: double checked these and they work at ups.com
Mode: production
UPS services: every option selected
Pickup type: daily pickup
Negotiated rates: no
Shipping rate markup: 0%
Product packages: each in its own package

Posts: 55
Joined: 08/17/2007

Edit

I only had the developers key, so I used that to get the access key. After I changed the info to reflect the access key, i got the exact same problem. No errors in watchdog and firebug just says "[ ]" in the response tab

UPS Shipper #: the shipper number I entered matches the shipper # on the ups website

Posts: 55
Joined: 08/17/2007

Ah this is driving me mad. I have absolutely no error messages to go by so I have no idea what could possibly be going wrong. Is there any lines that need to be uncommented in 7c to maybe get some error reporting? The error "Sorry I'm broken" that I'm getting now sucks :/

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

There isn't a big serialized, urlencoded string called "products" sent to ?q=cart/checkout/shipping/quote? That might be the problem. Trying to get a quote with no products would result in getting nothing back.

The trouble is, I'm not sure why the products aren't being sent. They should be taken from uc_cart_get_contents() by the shipping quote pane. I haven't seen it not work for a long time.

Posts: 55
Joined: 08/17/2007

This is the product string being sent

products 15%5EPhysician+Medical+Health+Scale%5ERGT-B-200-RT%5EDT%5E1%5E80%5E129%5E40%5Ea%3A3%3A%7Bs%3A10%3A%22attributes%22%3Ba%3A0%3A%7B%7Ds%3A5%3A%22model%22%3BN%3Bs%3A6%3A%22module%22%3Bs%3A10%3A%22uc_product%22%3B%7D

Could the error be something on UPS' end? The account is a few years old I believe, perhaps something needs to be updated? Is there a way I can see exactly what information is being sent over to UPS so I can ask one of their service reps?

edit
Also, I noticed details[zone] is always 0 no matter which state I select.

Posts: 55
Joined: 08/17/2007

Edit

Turns out the problem was selecting Small Package instead of <store default>. :/