6 replies [Last post]
Jmmb's picture
Offline
Joined: 08/23/2007
Juice: 301
Was this information Helpful?

Hello, we have a Ubercart (Drupal 5, UC 5.x-1.9) website based in California that ships to the U.S. and Canada using UPS and USPS. Shipping quotes are returned fine for U.S. addresses. However, we are unable to get quotes returned when shipping to an address in Canada.

The errors appear after entering the shipping address on the checkout page. Ubercart tries to get a quote, but then shows this:

undefined: Please enter a valid ZIP Code for the recipient.

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.

I have also enabled "Debugging information is displayed to administrators when quotes are generated.". As there are 4 UPS services checked, I'm getting 4 debug error strings. Since I'm assuming they're essentially the same, here's the 1st debug message:

undefined:
Hard 111210: The requested service is unavailable between the selected locations.

<?xml version="1.0" encoding="UTF-8"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>0C0B637B9246A0C0</AccessLicenseNumber>
  <UserId>xxxx</UserId>
  <Password>xxxx</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>01</Code>
  </PickupType>
  <CustomerClassification>
    <Code>01</Code>
  </CustomerClassification>
  <Shipment>
    <Shipper>
      <ShipperNumber>38F7W6</ShipperNumber>
      <Address>
        <City>Garberville</City>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>95542-3108</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </Shipper>
    <ShipTo>
      <Address>
        <StateProvinceCode>SK</StateProvinceCode>
        <PostalCode>S4V3E8</PostalCode>
        <CountryCode>CA</CountryCode>
      </Address>
    </ShipTo>
    <ShipFrom>
      <Address>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>95542</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipFrom>
    <ShipmentWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
        <Description>Pounds</Description>
      </UnitOfMeasurement>
      <Weight>1.0</Weight>
    </ShipmentWeight>
    <Service>
      <Code>12</Code>
      <Description>UPS 3-Day Select</Description>
    </Service>
    <Package><PackagingType><Code>02</Code></PackagingType><Dimensions><UnitOfMeasurement><Code>IN</Code></UnitOfMeasurement><Length>6.00</Length><Width>6.00</Width><Height>1.00</Height></Dimensions><PackageWeight><UnitOfMeasurement><Code>LBS</Code><Description>Pounds</Description></UnitOfMeasurement><Weight>1.0</Weight></PackageWeight><PackageServiceOptions><InsuredValue><CurrencyCode>USD</CurrencyCode><MonetaryValue>16.95</MonetaryValue></InsuredValue></PackageServiceOptions></Package></Shipment>
</RatingServiceSelectionRequest>

<?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Complex Rate Request</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>111210</ErrorCode><ErrorDescription>The requested service is unavailable between the selected locations.</ErrorDescription></Error></Response></RatingServiceSelectionResponse>

I should make clear that the zip code being entered is indeed valid. Interestingly, I'm not seeing any debug info. for the lack of USPS quotes...

I found some similar issues on this forum, and tried a few things (checking the workflow conditions, deselecting various UPS services), but nothing worked. I'm running out of ideas, and am not sure how to interpret the debug code. Any advice will be much appreciated!

Jim

(Drupal^Ubercart) * (Design^Development^Hosting) = Sundays Energy

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: Shipping Quotes Not Returned For Canada

UPS 3-Day Select is a domestic-only service, so the debug output you've shown above is exactly correct - "The requested service is unavailable between the selected locations." If you don't enable any international services, you won't see quotes for Canada.

<tr>.
Jmmb's picture
Offline
Joined: 08/23/2007
Juice: 301
Re: Re: Shipping Quotes Not Returned For Canada

Thanks for the reply, TR. I should have mentioned before that the 4 UPS Services selected are "UPS Ground", "UPS Next Day Air", "UPS 2nd Day Air", and "UPS 3-Day Select".

So I deselected "UPS 3-Day Select" and tried again, but still got the same message: "undefined: Please enter a valid ZIP Code for the recipient."

I then deselected all other UPS Services so only "UPS Ground" was selected. Upon trying again, I still get the same error.

- Jim

(Drupal^Ubercart) * (Design^Development^Hosting) = Sundays Energy

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: Re: Re: Shipping Quotes Not Returned For Canada

You don't have to deselect 3-Day, but you DO need to select at least one service that supports international shipping, otherwise you will always get the "There were problems getting a shipping quote." message. That message is telling you that none of the configured shipping modules returned a valid quote for this order. The UPS module sends a request to UPS for each of the services you've selected, and the response from UPS tells Ubercart whether or not that service can be used for the order. I think Ground can be used for international shipping (the other services you list cannot), but Ground requires customer-supplied packaging; if you have some other package type set Ground will also fail to get a quote. I suggest enabling UPS Standard and all the UPS Worldwide services and testing again. If you still don't get any quotes, post the ENTIRE debug output, not just the output from one selected method.

<tr>.
Jmmb's picture
Offline
Joined: 08/23/2007
Juice: 301
Re: Re: Re: Re: Shipping Quotes Not Returned For Canada

Thanks TR, that is very helpful information.

Well, I looked at UPS.com (http://www.ups.com/content/us/en/shipping/time/service/shipping/index.html) and these are the International shipping services currently available:

  • UPS Express Critical
  • UPS Worldwide Express Plus
  • UPS Worldwide Express
  • UPS Worldwide Saver
  • UPS Worldwide Expedited
  • UPS Standard

Interestingly, at /admin/store/settings/quotes/methods/ups only "UPS Standard" is a match under 'UPS Services'.

I then verified that the product I've been testing has "customer-supplied packaging" under UPS product description > Package type, and it does. Next, to make things simple, I deselected all the services other than "UPS Standard" (at /admin/store/settings/quotes/methods/ups) and tried another purchase.

The result is that it *did* return a shipping quote this time. However, it also returned the message "undefined: Please enter a valid ZIP Code for the recipient." right underneath the quote.

FWIW, here is the XML for that:

<?xml version="1.0" encoding="UTF-8"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>0C0B637B9246A0C0</AccessLicenseNumber>
  <UserId>xxxx</UserId>
  <Password>xxxx</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>01</Code>
  </PickupType>
  <CustomerClassification>
    <Code>01</Code>
  </CustomerClassification>
  <Shipment>
    <Shipper>
      <ShipperNumber>38F7W6</ShipperNumber>
      <Address>
        <City>Garberville</City>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>95542-3108</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </Shipper>
    <ShipTo>
      <Address>
        <StateProvinceCode>SK</StateProvinceCode>
        <PostalCode>S4V3E8</PostalCode>
        <CountryCode>CA</CountryCode>
      </Address>
    </ShipTo>
    <ShipFrom>
      <Address>
        <StateProvinceCode>CA</StateProvinceCode>
        <PostalCode>95542</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipFrom>
    <ShipmentWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
        <Description>Pounds</Description>
      </UnitOfMeasurement>
      <Weight>1.0</Weight>
    </ShipmentWeight>
    <Service>
      <Code>11</Code>
      <Description>UPS Standard</Description>
    </Service>
    <Package><PackagingType><Code>02</Code></PackagingType><Dimensions><UnitOfMeasurement><Code>IN</Code></UnitOfMeasurement><Length>4.00</Length><Width>4.00</Width><Height>1.00</Height></Dimensions><PackageWeight><UnitOfMeasurement><Code>LBS</Code><Description>Pounds</Description></UnitOfMeasurement><Weight>1.0</Weight></PackageWeight><PackageServiceOptions><InsuredValue><CurrencyCode>USD</CurrencyCode><MonetaryValue>11</MonetaryValue></InsuredValue></PackageServiceOptions></Package></Shipment>
</RatingServiceSelectionRequest>

<?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Complex Rate Request</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>11</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>1.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.57</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>14.57</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery/><ScheduledDeliveryTime/><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></TotalCharges><Weight>1.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>1.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>

undefined:
Please enter a valid ZIP Code for the recipient.

<?xml version="1.0"?>
<RateV3Response><Package ID="0"><Error><Number>-2147219497</Number><Source>DomesticRatesV3;RateEngineV3.ProcessRequest</Source><Description>Please enter a valid ZIP Code for the recipient.  </Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package></RateV3Response>

I then enabled the other 4 UPS Services, and tried again, with a similar outcome. So basically, the results now are acceptable in that the customer can complete the sale, and the unavailable services do not appear as errors or problems for a standard customer.

The only thing that's odd now is the "undefined: Please enter a valid ZIP Code for the recipient." message that's lingering below the UPS quote. Any additional help in sorting that out would be appreciated!

- Jim

(Drupal^Ubercart) * (Design^Development^Hosting) = Sundays Energy

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: Re: Re: Re: Re: Shipping Quotes Not Returned For Canada

I just noticed you're still on Drupal 5. I guess I don't have to tell you that that's pretty much obsolete at this point, and you should upgrade to D6 or even D7 as soon as you can. All the UPS Worldwide services are available in D6, and there have been an amazing number of improvements/bug fixes/new features since the Drupal 5 release.

Now that you've posted the entire debug output I can tell that "Please enter a valid ZIP Code for the recipient." is an error returned by USPS, (not UPS). I don't know what the problem is there, but it looks like the code is trying to get a USPS domestic quote (RateV3Response is USPS domestic) for the Canada address. I don't see the RateV3Request in the debug output, so I can't tell what's going wrong, and I haven't had a Drupal 5 site for a long time so I can't debug/fix the issue. Also be aware that in May USPS is turning off RateV3 and using the RateV4 API instead. This will cause all your USPS quotes to break. So you will either have to move the site to D6 or backport the RateV4 support before then.

<tr>.
Jmmb's picture
Offline
Joined: 08/23/2007
Juice: 301
Re: Re: Re: Re: Re: Re: Shipping Quotes Not Returned For Canada

Okay, this is also *really* good information to know (especially about the USPS stuff). I've been trying to coax the client into a Drupal/Ubercart update for a while, but there are some custom modules involved and it will be a good deal of work. Still, given this, an update in the near future is sounding essential. Anyway, thanks again for looking into this!

Best,

Jim

(Drupal^Ubercart) * (Design^Development^Hosting) = Sundays Energy