I have ubercart 2.0 / rc3 installed. I am trying to use google checkout to handle payments.

When a customer goes to buy a cart, they are not allowed to select different shipping options via radio button, and when they get inside google checkout, the price they are charged is the price of the items plus any sales tax added by google, but no shipping is added in to the final amount.

I can't seem to turn on the google checkout inside the ubercart checkout area, it has a checkbox for that method but it submits the order and tells you that you are done without ever sending you to google. I understand from conversation on the IRC channel that this may be a limitation in how google checkout works.

However, I can turn on google checkout on the "cart" (as compaired to the "checkout") page, but no shipping info is sent to google, so the user just pays the product price. In this case, a shipping pane is displayed; unlike in the ubercart checkout page, there is no radio buttons to select which shipping option you want. (Even with only one shipping option enabled, still no shipping price is sent to google).

Then, when you click the blue and white google checkout button, you are sent to google but the price you are charged is just the price of the item, no shipping is added in. (In my case it is the price of the item plus sales tax, because I have sales tax configured in the Google Checkout account.)

I have been looking at the code in uc_google_checkout.module, about line 486. That is where the shipping cost should be added to the google checkout, I think. It looks like the shipping information is only included if the shipping service and company is one of the ones supported inside the google checkout, which is FedEx, USPS, and UPS.

I need to have that code look up what shipping method the user has selected from a tablequote and flatfee options, and then use the google checkout "flatrate shipping" method to simply tell google checkout how much shipping will be. The relevant part of the Google Checkout API is here:

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_F...

That XML is simple, I could make uc_google_checkout.module produce that, but I am not sure where how to get the shipping price. I had planned to have the customer presented with several options to select via radio button, as that is how the ubercart checkout works, but the shipping options displayed on the cart page don't have a radio button.

In the long term what needs to happen is that the google checkout payment module needs to be configurable to either send the orgination and destination address and the shipping service and let Google Checkout figure the shipping, or to use ubercart to figure the shipping and just send that as a flat-fee dollar amount to Google Checkout.

Right now I am kind of stuck on this issue and it makes it impossible for me to use Ubercart and Google Checkout for this particular store (due to their custom shipping policy, that is a tablequote for most things and a flat fee for certain specific items). I made some inquiries about hiring a freelancer but I think I will fix it myself, unless someone more familar with the code can get to it first.

NOTE: I previously filed this here:

http://www.ubercart.org/issue/11504/google_checkout_does_not_use_shippin...

However someone told me UberCart issues were being tracked over here now.

CommentFileSizeAuthor
#10 493334_gco_shipping.patch11.6 KBIsland Usurper

Comments

TerrenceLP’s picture

this needs to work!

TerrenceLP’s picture

ok this should and can be done but not now :-)

for now you have to use this setting - Admin->Store->configurations->Google Checkout -> Shipping

You can manually enter your shipping info and prices - Shout out to Ubercart User Lyle thanks!

Island Usurper’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

bloke_zero’s picture

This makes things impossible for non US users of google checkout to ship goods though.

kentjames1980’s picture

Status: Closed (fixed) » Active

I agree with #5

There is no way that users outside the US can add a shipping rate to google checkout from within drupal / via basket options etc!

What we need is (and i dont know how to do it before anyone asks!!):

Ideally we need the same set up as Google has on its merchant area whereby we can set shipping options either flat rate or cumulative weight based shipping.

Our customers to our site are put off by the fact that the shipping isnt calculated on the site but in the GC environment.

Why isnt it possible to calculate the total bill before GC takes over for just the payment? Seems so simple yet doesnt exists? Unless anyone can point us in the right direction.

Thanks guys in advance, i dont understand the code etc but i love the end results - just needs tweeking in this instance...

=)

damienmckenna’s picture

Version: 6.x-2.0-rc3 » 6.x-2.4

Am experiencing this with a site where it seems to only use the "Default price" value and ignores the "Handling charge" and "Percentage markup/discount" values.

damienmckenna’s picture

Component: Code » 3rd party integration
damienmckenna’s picture

Priority: Normal » Critical

This really does not work well. Right now you can only add a single flat-rate to the entire order, the "Default price" value, so any orders submitted via Google Checkout will all go at a flat rate regardless of how much is ordered. Am updating the priority accordingly.

Island Usurper’s picture

Status: Active » Needs review
StatusFileSize
new11.6 KB

This patch is dependent on #579786-15: uc_google_checkout: Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML', so make sure you apply that patch first. It allows Ubercart to calculate shipping costs for Google Checkout. Since GCO wants a fallback price in case it loses connectivity with the website, Ubercart runs the shipping quotes with a default delivery address that is set in the GCO shipping settings. Make sure you set one that has an average shipping cost from your location. (For example, from Louisville, KY, set the address to Denver, CO since it's about halfway across the country.)

Island Usurper’s picture

Version: 6.x-2.4 » 6.x-2.x-dev
Status: Needs review » Fixed

Committed to 6.x-2.x. When a new release is made, I need to be sure to mention the configuration changes that will be necessary for anyone who has been using Google Checkout on their sites.

tr’s picture

Status: Fixed » Active

Ouch. This got committed to the 7.x-3.x branch. updatedb chokes on the unknown Drupal 6 function update_sql().

+
+/**
+ * Delete old shipping settings.
+ */
+function uc_google_checkout_update_6004() {
+  $ret = array();
+
+  $ret[] = update_sql("DELETE FROM {variable} WHERE name LIKE 'uc_google_checkout_shipping_%%'");
+
+  return $ret;
+}
tr’s picture

Assigned: Unassigned » Island Usurper
Island Usurper’s picture

Status: Active » Fixed

Sorry. Got excited about using git cherry-pick to port changes between branches and forgot about leaving the update functions off. It does give me an idea for an issue to prevent this kind of thing from happening, though.

Status: Fixed » Closed (fixed)

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