I am getting this error with my Google Checkout sandbox account:

Error parsing XML; message from parser is: cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type '#AnonType_nameMerchantCalculatedShipping'.

Also, when I enable Google Checkout it does not allow me to choose it as a payment option. When in the check out flow, Google Checkout is one step before Paypal or pay by check can be chosen. Is there a way to move Google Checkout to that step of the process?
Thanks!
Chris

Comments

longwave’s picture

To answer the second question, Google Checkout requires a link from the cart page and must be kept separate from standard checkout. From https://checkout.google.com/seller/policies.html:

You should place a Google Checkout or Buy Now button immediately beside, above or below every existing checkout button or link on your website wherever possible.
...
You must separate the Google Checkout flow from your existing checkout process. If buyers initiate your existing checkout process, they must not see a Google Checkout or Buy Now button.

chrispk2’s picture

Thanks for your response on item #2. That certainly gives google a leg up on other payment methods. - Chris

chrispk2’s picture

I determined that it is my flat rate shipping option that is causing Google checkout to fail. I do not know how to fix it though.

chrispk2’s picture

Title: Google Checkout Errors and Question » Google Checkout Error when Flat Rate Shipping is Selected
Category: support » bug
ericdjohnson’s picture

I also have this problem. I was planning on just hard coding a fix, but I haven't gotten around to it yet.

tr’s picture

Take it easy with the tags please. Tags are not needed for search purposes, they are intended to be used by maintainers for queue management purposes. See http://drupal.org/node/1023102

Island Usurper’s picture

Can you post what XML is being generated for the <merchant-calculated-shipping> tag? From what I can tell, it should be using the label for the flat rate quote, which is a required field on its form. I don't know why it would complain about it being empty.

Though, it may be that the problem is that you aren't getting any quotes back when calculating the default quotes. Make sure you have the delivery address in the Google Checkout settings set to something that will get a quote. Exactly where probably won't matter for flat rate shipping, but it might be necessary to specify something to keep all of the processes happy.

chrispk2’s picture

This is the error I see;
Notice: Undefined index: flatrate_1 in uc_google_checkout_cart_request() (line 624 of sites/all/modules/ubercart/payment/uc_google_checkout/uc_google_checkout.module)

Here is the code: (lines 618-626)

  $methods = module_invoke_all('shipping_method');
      module_load_include('inc', 'uc_quote', 'uc_quote.pages');
      $quote_data = uc_quote_assemble_quotes($order);
      foreach ($quote_data as $method_id => $options) {
        foreach ($options as $accsrl => $data) {
          if (isset($data['rate'])) {
            $output .= '<merchant-calculated-shipping name="' . check_plain($methods[$method_id]['quote']['accessorials'][$accsrl]) . '">';
            $output .= '<price currency="' . variable_get('uc_currency_code', 'USD') . '">' . $data['rate'] . '</price>';
            $output .= '</merchant-calculated-shipping>'; 

Any ideas how this can be fixed?

coofercat’s picture

I had the same problem until I read the install instructions ;-) (which actually are for Drupal 6, whereas I'm on 7). Anyway, as it says on admin/store/settings/google_checkout:

"In the Google Checkout Merchant Center [https://checkout.google.com/sell/settings?section=Integration], enter http://yoursite.com/google_checkout as the callback URL for this site. Also be sure that "Callback contents" is set to "Notification Serial Number" and that the API Version is 2.5. "

After I did this, I got rid of that error, although I now have a new one... I'll let you know when I get this new one sorted ;-)

chrispk2’s picture

Thanks so much for looking at this coofercat!

Did you have Flat Rate as a shipping option?

I did follow the directions to add the callback URL and the other options. The google checkout does work when I do not have a flat rate option, however, as soon as I enable the flat rate option it fails.

Chris

coofercat’s picture

...so I had another problem with my (development) site, so I blew it away and started again. Now I'm back to having this exact same problem (with a flat rate enabled). I wondered if getting rid of Flat Rate and instead having a weight based rate (which has a base price and doesn't increase by weight) would work - but that just does the same thing, but with another error: "Notice: Undefined index: weightquote_1 in uc_google_checkout_cart_request() (line 625 of /data/www/efd/shop/sites/all/modules/ubercart/payment/uc_google_checkout/uc_google_checkout.module)." (the other two errors are there as well).

So I need to keep digging into how to solve this...

coofercat’s picture

sussed it... (sort of) If you're using Google Checkout, then turn off any shipping quotes in UC. You'll then be able to get to Google Checkout. However, this does seem to generate some errors in UC, so it's not perfect (and not really what you want).

I'm starting to wonder if the Google Checkout module works with UC (and I'm slightly wondering if I want to use it at all...?)

Anonymous’s picture

Change $methods = module_invoke_all('shipping_method'); to $methods = module_invoke_all('uc_shipping_method');

longwave’s picture

Committed the hook name change from #13, but haven't tested this otherwise so there may well still be issues with Google Checkout.

tr’s picture

Status: Active » Postponed (maintainer needs more info)

Did #14 fix the problem?

Dubber Dan’s picture

I'm guessing this also applies to Ubercart 6.x in that it's not easy to pass shipping rates to Google Checkout. If that's the case then bye bye Google Checkout I won't be installing you

tr’s picture

Status: Postponed (maintainer needs more info) » Fixed

@Dubber Dan: If it's just the hook name change that was committed in #14, then no, it shouldn't be a problem in D6 because D6 used the old hook name - this was a bug simply because that line of code hadn't been properly updated for D7.

Marking this issue as fixed because there has been no further reports of problems after the fix committed in #14.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.