Forums / Addon Payment Modules / No Google Checkout Button...still.

No Google Checkout Button...still.

Locked

Views: 3,009

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
6 Oct 2009, 3:51 AM
#1
junkbox avatar

junkbox

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

No Google Checkout Button...still.

Really I've grown quite tired of tracking this by now. I've looked through all of the threads RE: google checkout and still don't have an answer.

I have installed and tested my responsehandler and all is well... my account both in sandbox and real doesn't show a google checkout option. I've tried it all and have so many backups of my templates folder i've lost place.

It has never worked from day one, and I though it was a sandbox issue but apparently not.

Can anyone please offer a concise description of how to get the GC button to actually show up? The module is activated, the code is in default_login and shopping_cart_default and orders etc.

I'm going to link to my tpl's that need the google code and there's a $30 PayPal bonus for someone who can answer this question simply and get this working.

http://alderwoodgroup.com/gcheckout.zip

GC 1.4.7
ZC 1.8.3a
apache

:censored:

7 Oct 2009, 10:37 PM
#2
junkbox avatar

junkbox

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Re: No Google Checkout Button...still.

update:

Well I've narrowed it down a bit here...

After adding the goggle code to my tpl_shopping_cart_default.php not only does the Google Checkout button not appear but NOTHING after the Google checkout code appears behold:

Without Code modification:

http://junkfiles.org/nocode1.jpg

the page displays like this:

http://junkfiles.org/nocode2.jpg

NOW with the GC code:

http://junkfiles.org/withcode1.jpg

the page displays like this:

http://junkfiles.org/withcode2.jpg

The same goes with code added to the login tpl.

Any ideas? It's obvious the code "breaks" the page but why?

7 Oct 2009, 11:55 PM
#3
slomojojo avatar

slomojojo

Zen Follower

Join Date:
Feb 2009
Posts:
142
Plugin Contributions:
0

Re: No Google Checkout Button...still.

I installed the files from your zip on my test site and the GC button showed fine; no problems. I think you may be missing a file somewhere else.

I'll take a wild stab at this: is googlecheckout.php present in the \includes\modules\payment\ folder? Deleting that file is the only thing I tried that wiped out the shopping cart like the screenshot you uploaded.

8 Oct 2009, 12:25 AM
#4
junkbox avatar

junkbox

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Re: No Google Checkout Button...still.

is googlecheckout.php present in the \includes\modules\payment\ folder?

I was thinking the same thing, but that file is present.

 include(DIR_WS_MODULES . 'show_google_components.php'); 

is obviously what breaks it, so i'm trying to work backwards from there:

show_google_components.php contains only the following code:

	if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') && MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') {
	  include('googlecheckout/gcheckout.php');
  }

So I move on to gcheckout (which is also present) and the first include/require is the file you mentioned:

require('includes/languages/' .  $_SESSION['language'] . '/' .'modules/payment/googlecheckout.php');
require_once('includes/modules/payment/googlecheckout.php');

So I verified that both of those files were in the correct location.

The final includes/requires in that page are:

require('googlecheckout/library/googlecart.php');
require('googlecheckout/library/googleitem.php');
require('googlecheckout/library/googleshipping.php');
require('googlecheckout/library/googletax.php');

So I verified the location and existence of these... and still no go.

So really following that logic the only thing i can think of is that:

the initial code in the shopping cart (login et. al.) (DIR_WS_MODULES . 'show_google_components.php');

can't find the file show_google_components.php at all (so it never even knows to go deeper for the other files) and subsequently breaks the rest of the page. I'm not familiar enough with PHP and it's error handling to know if a failed include directive will cause the preprocessor to stop parsing the page...this may be the case.

That's all I can come up with right now, does this seem right?
maybe a path issue? is DIR_WS_MODULES defined somewhere? even then wouldn't other pages/modules be broken?

seriously...i like a good problem but i'm growing thin on this one.

8 Oct 2009, 1:05 AM
#5
slomojojo avatar

slomojojo

Zen Follower

Join Date:
Feb 2009
Posts:
142
Plugin Contributions:
0

Re: No Google Checkout Button...still.

I've tested it some more and I still think it's a problem with the googlecheckout.php file located in \includes\modules\payment\ folder.

Don't forget, there's 2 files named googlecheckout.php with completely different content. The other is at \includes\languages\english\modules\payment\ and they're extremely easy to mix up. I would upload all the installation files again, one by one, and test the results. I'd also check the settings on the FTP client just in case the files are getting corrupted during the upload.

8 Oct 2009, 3:02 AM
#6
junkbox avatar

junkbox

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Re: No Google Checkout Button...still.

I've reinstalled each page deleting the previous version (this makes it like 17 times to date)

are there any permissions issues i should have with this file? currently it's 644. both exist in their correct locations.

can you verify this is the correct file for modules/payment?

http://junkfiles.org/gchex.jpg

I'm in agreement with you that a file isn't being found not necessarily googlecheckout.php, but definately a file referred to by "show_google_components"... are you aware if PHP stops preprocessing on a missing include/require?
Is there a way for ME to force an output of an error to the display? I'm truly baffled at this point.

8 Oct 2009, 9:11 AM
#7
slomojojo avatar

slomojojo

Zen Follower

Join Date:
Feb 2009
Posts:
142
Plugin Contributions:
0

Re: No Google Checkout Button...still.

Darn, that looks right. The file size and permissions are correct. The other googlecheckout.php is a language define file of 9,130 bytes; that needs to be present also.

I'm baffled too. Yeah, the PHP is broken somewhere. The thing is, it's not just GC that's broken in your screenshot, it's the entire page after GC: Paypal Express and the Shipping estimator right on to the footer. Every other GC file I deleted when I tested it broke GC only, but Paypal and the rest of the shopping cart page still loaded. Only deleting either of the 2 googlecheckout.php files broke the entire shopping cart page; that's why I pointed them out.

Sorry to have gotten you on the wrong track.

Maybe Dr. Byte's error debug utility would help with more detailed PHP errors: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=860

8 Oct 2009, 5:09 PM
#8
junkbox avatar

junkbox

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Re: No Google Checkout Button...still.

slomojojo:

Sorry to have gotten you on the wrong track.

Maybe Dr. Byte's error debug utility would help with more detailed PHP errors: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=860

whaaaaat?... no way man. I'm totally off track already :blink:

I installed the above bit of code you suggested and lo and behold something in the down the line (enough with the train references) from show_google_components does in fact cause a fatal PHP error. Which explains why the preprocessor stops at that include.

check it out...

[08-Oct-2009 10:18:18] PHP Fatal error: Cannot redeclare compare() (previously declared in /home5/peaceou1/public_html/includes/functions/extra_functions/added_function_for_google_checkout.php:345) in /home5/peaceou1/public_html/googlecheckout/gcheckout.php on line 417

I haven't looked at these pages yet but will just now, What are your initial thoughts?

9 Oct 2009, 12:40 AM
#9
slomojojo avatar

slomojojo

Zen Follower

Join Date:
Feb 2009
Posts:
142
Plugin Contributions:
0

Re: No Google Checkout Button...still.

This file, added_function_for_google_checkout.php, belongs in the /admin/includes folder. It looks from that error like it's in the wrong includes folder.

9 Oct 2009, 1:49 AM
#10
williewontgo avatar

williewontgo

New Zenner

Join Date:
Oct 2009
Location:
New York, USA
Posts:
70
Plugin Contributions:
0

Re: No Google Checkout Button...still.

Yes, that is correct.

The file should be in the admin/includes/functions/extra_functions folder.

9 Oct 2009, 3:32 PM
#11
junkbox avatar

junkbox

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Re: No Google Checkout Button...still.

That was VERY perceptive slomojojo. I had that file in both places!

For posterity here's exactly what went down:

  1. I noticed that the page was actually breaking from the include(), not just failing to show the GC button. It was failing to show the rest of the page.

  2. slomojojo took the time to install the tpls to his site proving it was not a code issue, and offered up the mod that could actually tell us where the preprocessor was dying.

  3. chain_man, master of Gcheckout, via PM said the following in regards to the Fatal error: "Sometimes the message indicates that there are duplicate copies of a file (maybe in 2 different locations...). "

  4. Before I had a chance to pull the file structure over and do a search for duplicates, slomojojo's keen eye notcied that the file was in the wrong location. Turns out THAT was the duplicate file chain_man had warned about.

what is interesting to me is that the GCheckout or maybe the ZC engine looked in the root includes folder first instead of looking in admin\includes.

So as stated in the first post, and if there are no objections, I am donating $30 to the ZenCart on behalf of slomojo, chain_man and myself. None of us alone had an answer, but together we got it sorted out.

This truly is a great community. :clap:

thanks again
-jb

9 Oct 2009, 3:57 PM
#12
slomojojo avatar

slomojojo

Zen Follower

Join Date:
Feb 2009
Posts:
142
Plugin Contributions:
0

Re: No Google Checkout Button...still.

I'm really glad you got it working. Now comes the hard part; setting up the shipping preferences.

9 Oct 2009, 4:39 PM
#13
junkbox avatar

junkbox

New Zenner

Join Date:
Aug 2009
Posts:
29
Plugin Contributions:
0

Re: No Google Checkout Button...still.

yes, it does seem my victories are often short lived.