Jump to content
Silverado05

Offical Google Checkout module for osCommerce Support Thread

Recommended Posts

Thank you so much to everyone who has participated in the creation of this module! I really appreciate all your hard work! I have it installed and it appears to be working well, even with USPS calculated rates.

 

That being said, is there a way to have the shipping order sorted by highest to lowest in the google checkout? I was looking for a sort order or a < or > and didnt see it. Perhaps I'm not looking in the right place.

 

I have a free pickup module in my shipping and I dont want to have every customer just going through checkout without selecting the correct shipping method and having to invoice them for the difference because they didnt read. I would prefer to have the highest shipping charge shown first, it will give them some incentive to select the correct option.

 

Thanks again!

Share this post


Link to post
Share on other sites

This is largely unrelated to the above posts, but I also suffered from $0 shipping rate quotes in Google Checkout using merchant calculated rates. I had the UPS XML module installed and the Google Checkout 1.4beta contribution. The error I found was that UPS XML redeclared a class XMLParser which threw a fatal error and sent no response to Google.

For anyone using UPS XML rates this is an easy fix. Simply open /includes/classes/xmldocument.php and rename XMLParser to upsXMLParser, and rename the appropriate calls to it in /includes/modules/shipping/upsxml.php. There are only two calling for a new XMLParser, change them to upsXMLParser. I am not sure whether other contributions have dependencies on the xmldocument class file. If they do this might require a more severe modification but this is the solution that worked for me.

 

The usual cause for $0 shipping rates are a) Request Timeout [We timed out...], b) Force Cookies is True [HTTP 500: Shopping cart not obtained from session] (without the above workaround), c) PHP errors are being sent back to Google [Error parsing XML...], d) nothing is being sent back to Google due to a fatal error without display errors being turned on [Your server returned no data in response..].

While debugging I recommend adding ini_set('display_errors', 1); near the top of /googlecheckout/responsehandler.php if you are using a secure server that does not display errors normally. This will allow you to view any errors created in the Google Checkout (Sandbox hopefully) Integration Center under settings.

 

I hope this helps someone

Edited by tiernanc

Share this post


Link to post
Share on other sites

For some reason, since this install my cart link now shows (1) $0.00 all the time, when its empty and adds 1 to the number of items in the cart when it does have something in it. Is there something I need to change in that code to fix this?

 

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'); ?>" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?> (<?=$cart->count_contents()?>) <?= $currencies->format($cart->show_total())?>

 

Also, I was wondering if I have worldwide shipping available (USPS module) will all countries (who can use google checkout) be able to checkout through google or do I need to edit the code to allow this. I looked over the code and it appeared to be allowing "all" to checkout, but I wanted to be sure.

Share this post


Link to post
Share on other sites
Hello there, I'd appreciate an answer on this if someone out there can help me.

 

I've just installed v1.4beta1 but I'm in the UK and can't seem to get it to add VAT (17.5%) on my taxable products.

 

Can anybody point me to the file to edit?

 

Cheers :thumbsup:

 

Not being from the UK I am not sure how your tax works. Do you have your Zones set up correctly in your OSC Admin?


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
For some reason, since this install my cart link now shows (1) $0.00 all the time, when its empty and adds 1 to the number of items in the cart when it does have something in it. Is there something I need to change in that code to fix this?

 

<a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'); ?>" class="headerNavigation"><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?> (<?=$cart->count_contents()?>) <?= $currencies->format($cart->show_total())?>

 

Also, I was wondering if I have worldwide shipping available (USPS module) will all countries (who can use google checkout) be able to checkout through google or do I need to edit the code to allow this. I looked over the code and it appeared to be allowing "all" to checkout, but I wanted to be sure.

 

About your cart showing 1 item but $0.00 that is probably due to you doing a lot of testing under the same using during one session. Just run a test order on with your normal OSC checkout process. Don't add anything else to the cart and do try to remove it. This is one reason I have the contribution "Fax or Phone your Order" because you can easily use it for test orders and then delete it from the admin and if you don't want to offer that payment method then you can disable it and just use it for testing.

 

If you have your USPS module set up for worldwide shipping and you have it set in your shipping_methods.php then you should be good to go. Only way to test this though is to make a couple of sandbox buyer accounts from different places around the world and make sure it is working correctly.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
Hi Nick

 

My problem was :

 

QUOTE(doni @ Aug 9 2007, 04:45 AM)

 

I have installed the latest contribution, and have the following errors :

 

Warning: getxml(xml-processing/xmlbuilder.php): failed to open stream: No such file or directory in /mysite/googlecheckout/library/googlecart.php on line 232

 

Fatal error: getxml(): Failed opening required 'xml-processing/xmlbuilder.php' (include_path='') in /mysite/googlecheckout/library/googlecart.php on line 232

 

... at the point where I enter the Checkout Page (with items in my cart), and below the "- or Use -" text.

 

I used to see this code sometimes in the past, and if I refreshed the page, the GC button would usually appear. I have actually processed an order using GC. But now, this text always appears, and NO GC buttone ever appears even when I refresh the page.

 

Anyone any guidance on what I should do, or generally what this error means?

___________

 

AND YOU ASKED FOR MY SHOPPING CART, WHICH IS :

___________

 

 

I don't know why I asked you for your shopping_cart.php must have been late and I was tired because if you are getting that error then the button code is in place.

 

What version are you using and have you installed anything else after GC? I have seen this error before and sometimes it is because of Google because these buttons are generate from the Google server. In your case though I don't think this is because of Google, I think you have changed a setting someone that is throwing this error. So double checkout your installation and make sure you have all the correct files uploaded.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
I don't know why I asked you for your shopping_cart.php must have been late and I was tired because if you are getting that error then the button code is in place.

 

What version are you using and have you installed anything else after GC? I have seen this error before and sometimes it is because of Google because these buttons are generate from the Google server. In your case though I don't think this is because of Google, I think you have changed a setting someone that is throwing this error. So double checkout your installation and make sure you have all the correct files uploaded.

 

 

Nick - I am dumbfounded by this.

 

Here is what I tried this morning.

 

1. added an item to my basket.

2. At the shopping cart page I actually saw the button.

3. I pressed F5, and the error occurred, showing the text I had previously previously quoted

4. I pressed the F5 button six more times, and the error was still there, but on the 7th occassion, the button appeared!

5. I kept pressing the F5 button, and the button appears randmonly, but on average after about 8-9 re-fresh, and on every other occasion, there errior is apparent.

 

It therefore appears to me, that I have installed this correctly, but something is unstable, but I have no idea what this might be?

Edited by doni

Share this post


Link to post
Share on other sites
Not being from the UK I am not sure how your tax works. Do you have your Zones set up correctly in your OSC Admin?

 

Spot on, that worked. Thanks for your help.

Share this post


Link to post
Share on other sites
Nick - I am dumbfounded by this.

 

Here is what I tried this morning.

 

1. added an item to my basket.

2. At the shopping cart page I actually saw the button.

3. I pressed F5, and the error occurred, showing the text I had previously previously quoted

4. I pressed the F5 button six more times, and the error was still there, but on the 7th occassion, the button appeared!

5. I kept pressing the F5 button, and the button appears randmonly, but on average after about 8-9 re-fresh, and on every other occasion, there errior is apparent.

 

It therefore appears to me, that I have installed this correctly, but something is unstable, but I have no idea what this might be?

 

Yea that is weird. You do have it installed correctly or you wouldn't be getting any errors or button at all.

 

What version are you using?

 

Also have you looked to see if any errors are showing up in your error log and on the settings page under integration on the Google Checkout side?


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
Yea that is weird. You do have it installed correctly or you wouldn't be getting any errors or button at all.

 

What version are you using?

 

Also have you looked to see if any errors are showing up in your error log and on the settings page under integration on the Google Checkout side?

 

1. Using 1.4 beta

 

2. Guess what - my "F5 refresh hit rate" (when I observe the Google Checkout buttone, compared to seeing the error), has improved to about 5 in 8 (from 1 in 8 yesterday).

 

3. I cannot locate any error files on the Google side.

 

4. The only error files I have on my side is "Failed to Get Basic Authentication Headers" when I ran https://mysite/googlecheckout/responsehandler.php. I had investigated this in the past, in a post rpou was having with someone else, and he suggested invoking the htaccess.php file to create the .htaccess and .htpasswd files in Googlecheckout/, but this has no effect on whether the button show or not, so I removed the .htaccess and .htpasswd files and re-set back to using without this.

 

5. This next point is very interesting : When I run the Shipping_Generator file, sometimes I get :

 

Warning: main(multishipping_generator.php): failed to open stream: No such file or directory in /mysite/googlecheckout/shipping_generator/shipping_method_generator.php on line 284

 

Warning: main(): Failed opening 'multishipping_generator.php' for inclusion (include_path='') in /mysite/googlecheckout/shipping_generator/shipping_method_generator.php on line 284

 

... and sometimes, when I refresh F5, I get the correct table showing.

 

6. On the face of it, it seems to me that I am having some kind of resource issues here, where the files cannot complete a task, but I have ample server space, and the traffic is very low at this time of year, so I don't think the resource issue is coming from my side. (i.e. Without GC, we can process order through HSBC fine).

 

I think I am very stuck.

Share this post


Link to post
Share on other sites

I am not sure what to tell you honestly. If it works sometimes but not others it is probably a Google error. I would try contact them through their support and tell them the issue. or reach Ropu on his support forum since he is the Author of the module he might be able to help you further.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites

Yes - it is a tricky one isn't it.

 

Thanks for all your time on these boards supporting people.

Share this post


Link to post
Share on other sites

As an aside - is there a way that I can hide this Warning while I figure out why this isn't working.

 

i.e. - if the Google button only show 40% of the time, when the "Failed to Open" error text occurs on the other 60% of the time, can I NOT show this text somehow? The problem is, when the button doesn't show, and the error appears, it looks like the whole website is faulty ...

 

Even better, if the error occurs, instead of displaying the "Failed to Open" error text, is there a way I can replace this with (e.g.) "Please refresh screen for Google Checkout options" instead - this would at least inform the buyer that they have a Google Checkout option, and they need to refresh the screen in order to use that method ...

Share this post


Link to post
Share on other sites

PROBLEM: UPS XML Rates not being sent to Google Checkout!

 

The module works fine in OSC checkout. I get the rate quotes, etc. However, when I use Google Checkout it lists the UPS shipping options properly but list a $0 charge for all of them! I already searched the forums and can't find anything on this issue. I already ran the Google Shipping Generator and modified the code as needed in the Google Checkout contribution. Any ideas ???

 

Thanks!

 

To see issue - Visit My Website

Share this post


Link to post
Share on other sites

I've just had my site moved to a new server, and GC is giving me issues. No visible errors to the user, but all shipping is $0.00. I am using FedEx shipping.

 

Looking at the GC Integration control panel, here is the error:

 

We timed out waiting for your server at https://www.mydomain.com/catalog/googlechec...onsehandler.php -- the error we got is: Read timed out Your server must respond faster to merchant calculation callback requests.

 

What's the fix? I'm running a rather old version of GC - is the fix an upgrade or does something on the server need to be started/installed?

Edited by DriWashSolutions

John Skurka

Share this post


Link to post
Share on other sites
I've just had my site moved to a new server, and GC is giving me issues. No visible errors to the user, but all shipping is $0.00. I am using FedEx shipping.

 

Looking at the GC Integration control panel, here is the error:

 

We timed out waiting for your server at https://www.mydomain.com/catalog/googlechec...onsehandler.php -- the error we got is: Read timed out Your server must respond faster to merchant calculation callback requests.

 

What's the fix? I'm running a rather old version of GC - is the fix an upgrade or does something on the server need to be started/installed?

 

interesting... I'm running the newest version available and still get the $0 price feeds from UPS XML

Share this post


Link to post
Share on other sites

I have two problems.

 

First, no shipping will be applied to use google checkout. It is always zero. Even I set per item price. It is still zero.

 

Second, about the usps shipping the webpage http://www.uspsprioritymail.com/et_regcert.html doesn't exist any more. Anyone has an ideal how to register for the production account.

 

Thank you very much.

 

BTW, if I use paypal checkout, the shipping is alright.

Share this post


Link to post
Share on other sites
Even better, if the error occurs, instead of displaying the "Failed to Open" error text, is there a way I can replace this with (e.g.) "Please refresh screen for Google Checkout options" instead - this would at least inform the buyer that they have a Google Checkout option, and they need to refresh the screen in order to use that method ...

 

Their might be but I don't know about it. That is a very good idea for it to have a customized default error message instead of the generic. I will get back to you on that and let me look at the files and see if their is a debug option in the code that can be comment out. Seeing that these buttons are generate from Google most of these errors come from Google.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites

Ok for everyone have shipping problems do this for me.

 

try adding

print_r($directory_array);

 

to gcheckout.php line 311

 

and

print_r($module_info);

 

in line 356

 

send me the results u should see in any page where the GC button appears.

 

 

Second, about the usps shipping the webpage http://www.uspsprioritymail.com/et_regcert.html doesn't exist any more. Anyone has an ideal how to register for the production account.

 

As far as the link goes it still works, I just tried it and took me straight to the page.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
Ok for everyone have shipping problems do this for me.

 

try adding

print_r($directory_array);

 

to gcheckout.php line 311

 

and

print_r($module_info);

 

in line 356

 

send me the results u should see in any page where the GC button appears.

As far as the link goes it still works, I just tried it and took me straight to the page.

 

Array ( [0] => fedex1.php [1] => flat.php [2] => item.php [3] => table.php [4] => upsxml.php [5] => usps.php ) Array ( [fedex1] => Array (

 => fedex1 [title] => Federal Express [description] => Federal Express

 

You will need to have registered an account with FEDEX to use this module. Please see the README.TXT file for other requirements. [status] => 1 ) [flat] => Array ( [code] => flat [title] => Flat Rate [description] => Flat Rate [status] => 1 ) [table] => Array ( [code] => table [title] => Table Rate [description] => Table Rate [status] => 1 ) [upsxml] => Array ( [code] => upsxml [title] => United Parcel Service (XML) [description] => United Parcel Service (XML) [status] => 1 ) )

Share this post


Link to post
Share on other sites
Ok for everyone have shipping problems do this for me.

 

try adding

print_r($directory_array);

 

to gcheckout.php line 311

 

and

print_r($module_info);

 

in line 356

 

send me the results u should see in any page where the GC button appears.

As far as the link goes it still works, I just tried it and took me straight to the page.

 

WOW, thank you Silverado05,

 

I did not expect this lighting fast reply.

 

While, I did exactly what you said. I add those two lines into the bland lines in the gcheckout.php. (311, 356), it still doesn't solve the problem

In stead, when I click the cart button, it shows "Array ( ) Array ( ) " at the left side of the google checkout button.

 

It is a completely new web. I just replaced some icons. Nothing else had been changed.

 

Thank you

Share this post


Link to post
Share on other sites
1. Using 1.4 beta

 

2. Guess what - my "F5 refresh hit rate" (when I observe the Google Checkout buttone, compared to seeing the error), has improved to about 5 in 8 (from 1 in 8 yesterday).

 

3. I cannot locate any error files on the Google side.

 

4. The only error files I have on my side is "Failed to Get Basic Authentication Headers" when I ran https://mysite/googlecheckout/responsehandler.php. I had investigated this in the past, in a post rpou was having with someone else, and he suggested invoking the htaccess.php file to create the .htaccess and .htpasswd files in Googlecheckout/, but this has no effect on whether the button show or not, so I removed the .htaccess and .htpasswd files and re-set back to using without this.

 

5. This next point is very interesting : When I run the Shipping_Generator file, sometimes I get :

 

Warning: main(multishipping_generator.php): failed to open stream: No such file or directory in /mysite/googlecheckout/shipping_generator/shipping_method_generator.php on line 284

 

Warning: main(): Failed opening 'multishipping_generator.php' for inclusion (include_path='') in /mysite/googlecheckout/shipping_generator/shipping_method_generator.php on line 284

 

... and sometimes, when I refresh F5, I get the correct table showing.

 

6. On the face of it, it seems to me that I am having some kind of resource issues here, where the files cannot complete a task, but I have ample server space, and the traffic is very low at this time of year, so I don't think the resource issue is coming from my side. (i.e. Without GC, we can process order through HSBC fine).

 

I think I am very stuck.

 

 

I just saw this post. I followed it and run the responsehandler.php

 

I got a smilar error

 

Warning:

 

googlecheckout(/mnt/w0401/d20/s44/b02b9525/www/mysite/catalog/googlecheckout/includes/languages/english/modules/payment/googlecheckout.php) [

function.googlecheckout]: failed to open stream: No such file or directory in /mnt/w0401/d20/s44/b02b9525/www/mysite/catalog/includes/modules/payment/googlecheckout.php on line 38

 

Fatal error:

 

googlecheckout() [function.require]: Failed opening required '/mnt/w0401/d20/s44/b02b9525/www/mysite/catalog/googlecheckout/includes/languages/english/modules/payment/googlecheckout.php' (include_path='.:/usr/local/nf/lib/php:.:.') in /mnt/w0401/d20/s44/b02b9525/www/mysite/catalog/includes/modules/payment/googlecheckout.php on line 38

 

Anyone can help me figure out the reason?

 

Thank you in advance.

Share this post


Link to post
Share on other sites
Ok for everyone have shipping problems do this for me.

 

try adding

print_r($directory_array);

 

to gcheckout.php line 311

 

and

print_r($module_info);

 

in line 356

 

send me the results u should see in any page where the GC button appears.

As far as the link goes it still works, I just tried it and took me straight to the page.

 

here's mine:

 

Array ( [0] => dly.php [1] => fedex1.php [2] => flat.php [3] => item.php [4] => spu.php [5] => table.php [6] => ups.php [7] => usps.php [8] => zones.php )

 

The print statement at line 356 is in the middle of a block of code - not sure it's the right spot for that. BTW, I'm using 1.3RC2


John Skurka

Share this post


Link to post
Share on other sites

Just up-degraded from 1.3RC2 to 1.4 and am getting the following errors when viewing the shopping cart:

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

 

- Or use -

 

What is Google Checkout?

* The Version of the installed module in the Admin UI is MODULE_PAYMENT_GOOGLECHECKOUT_VERSION and the one of the package is GOOGLECHECKOUT_FILES_VERSION, Remove/Reinstall the module

Edited by DriWashSolutions

John Skurka

Share this post


Link to post
Share on other sites
Just up-degraded from 1.3RC2 to 1.4 and am getting the following errors when viewing the shopping cart:

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

 

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxx/public_html/catalog/googlecheckout/gcheckout.php on line 218

 

- Or use -

 

What is Google Checkout?

* The Version of the installed module in the Admin UI is MODULE_PAYMENT_GOOGLECHECKOUT_VERSION and the one of the package is GOOGLECHECKOUT_FILES_VERSION, Remove/Reinstall the module

 

Disregard this one - got it figured out and am now running v1.4

 

however, shipping is now (--) in the GCO page.


John Skurka

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×