Zen Cart Logo
Forums / Addon Payment Modules / Google Checkout module for ZC 1.3.x (beta)

Google Checkout module for ZC 1.3.x (beta)

Locked

Views: 1,099,916

Results 2,661 to 2,680 of 3,921
This thread is locked. New replies are disabled.
25 Aug 2008, 7:01 PM
#2661
hairydog avatar

hairydog

Zen Follower

Join Date:
Sep 2006
Posts:
165
Plugin Contributions:
0

Google Checkout module for ZC 1.3.x (beta)

I don't seem to be having the same problems, but there is a big issue for me with GC as a payment option: I can't find a way for the customer to add notes to their order when paying by GC.

Is there a fix or a workaround for this?

25 Aug 2008, 11:42 PM
#2662
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Sorry hairydog, I don't know if that is possible.

Well, I tried ropu's responsehandler test, and it timed out with no response. I keep fiddling with this, but it never works. :frusty: Does anyone have any idea why responsehandler isn't returning anything?

26 Aug 2008, 1:25 AM
#2663
ladyink avatar

ladyink

Zen Follower

Join Date:
Oct 2007
Posts:
105
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

srturner47:

I am having the same problem that dscott1966 is having. Everything appears to work fine -- the information transfers to Google Checkout and I can even enter coupon codes that are stored in Zen Cart. However, when I click the "process order" I get a blank page with the title tag "Error" and the Google Checkout Logo. No information is provided about the error on the page, and both my logs and google checkouts logs have no information about any errors.

I've emailed Google Checkout, but they say that this is a Zen Cart integration issue. I don't see how that is possible, but maybe I am wrong. Communication works fine between Zen and GC, so I just don't understand how this could be the case.

Has anyone else experienced this problem and found a fix? I am stumped. :frusty:

I actually had this issue earlier and it turned out to be that I was using the same account to purchase that takes the payment. I used my husband's account and it works now. If I could just get the order to show up in admin- all would be well. I'm getting the Invalid or not supported Message on the responsehandler- I believe that something is right. Just need to find that one little thing!!

Nancy

26 Aug 2008, 2:37 AM
#2664
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

ladyink, thank you, thank you, thank you! You have no idea how much time I've spent troubleshooting that.... I never thought for a moment that the problem could be using my google checkout account to checkout. I tried my wife's account, and it went through! Yea!

I'm sorry you are still having trouble with orders showing up. You might try messing around with the PHP-CGI option called ".htaccess Basic Authentication Mode"

Thanks again!

26 Aug 2008, 7:40 AM
#2665
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Alright. I think I have everything working now, except for taxes. The only way I can get taxes to work is to define a tax class for each shipping type. However, this causes the shipping costs to be taxed as well. My state doesn't tax shipping costs. :( Is there a way to make it tax items without defining a tax class for each shipping type?

To compound this problem, my state makes me charge higher taxes in the county I live in. To solve that, I installed a mod that I can't find anymore, but essentially works like LadyHLG's Local Sales Tax Mod. Of course, Google Checkout isn't picking up that sales tax.

Has anyone had any success charging sales tax, but not applying it to shipping costs? Has anyone figured out how to get this to work with several different zip codes?

Thanks!

27 Aug 2008, 7:31 AM
#2666
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

OK. I think I've figured out taxes. That seems to be the one area where this mod could use some improvement. I will make a post about how to do anything you want with taxes later, but it is kind of involved, and I am exhausted tonight, so I will write this post sometime in the next couple of days. Hopefully someone else will find it useful.

Anyway, I have one last problem with this module, and I don't know if it is caused by my template or not. I was hoping that someone could test this scenario on their Zen Cart install w/ GC and let me know if the same thing happens:

When estimate shipping on the shopping cart page is enabled AND a user is logged in, the sideboxes disappear.

Of course, the easy fix for this is to disable estimate shipping or change estimate shipping to a button that links to the estimator, however, I'd rather have it on my cart if possible. I'd love to hear if other people are having this problem or if it is just me and my template.

Thanks!

27 Aug 2008, 5:36 PM
#2667
alan_powerbrixx avatar

alan_powerbrixx

New Zenner

Join Date:
Jul 2007
Location:
Durham, NC
Posts:
56
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

srturner47:

When estimate shipping on the shopping cart page is enabled AND a user is logged in, the sideboxes disappear.

I have the same problem in ver. 1.3.7, which I have not figured out either. But I do see the php error message, "Fatal error: Cannot redeclare class order in .../includes/classes/order.php on line 23" But only in 1.3.7, when shipping estimator is set to display on the page (option 2), and when the user is logged in. The button-popup estimator (option 1) works just fine, logged in or not. And the on-page estimator works for a guest visitor, not logged in. If you're using 1.3.7, I assume you're getting exactly the same thing. The page stops displaying at that point before it has gotten to the right column sideboxes, or anything further in the center column as well. You might want to check to see if you're getting the same error message, but it didn't help me. I still couldn't figure it out.

This does not for me happen in 1.3.8a. It functions just fine with the estimator displayed on the page, and when the user is logged in. I just realized, I don't have the Google Checkout mod running in 1.3.8a, becuase of the "Fatal error" I get when trying to install the module in admin, for which no one seems to have any advice. (See post #2651 on this thread.) Therefore, my production site is stuck in 1.3.7. I cannot upgrade to 1.3.8a, because I can't get the Google Module to install.

28 Aug 2008, 12:12 AM
#2668
moonrider avatar

moonrider

New Zenner

Join Date:
Aug 2008
Posts:
1
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

I am looking for a way to use Google Checkout with Zen Cart under multiple zone shipping rate tables. I searched for the answer and a few people says Google checkout module for Zen Cart currently supports only flat rate, per item rate and table rate, but no zone rates (multiple zone table rates). Because the Zen Cart standard version does provide only one zone table rate within a single country (USA), I had to install an add-on module that allows three more zone table rates within USA. In all, I have a total of three shipping zones, each shipping zone having a table rate based on the total sales amount. Currently I get an error message saying that my table rates are not configured... I think this is because I have multiple zone rates. Can anyone help me on this?

28 Aug 2008, 12:14 AM
#2669
dscott1966 avatar

dscott1966

Zen Follower

Join Date:
Apr 2005
Posts:
298
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Ok i'm having a couple of weird problems here, hope someone can help me.

Problem #1, When you checkout with GC i'm not getting the orders back into ZC i went through this whole post and still cannot solve the problem. I'm getting them in GC just not in ZC.

Problem #2, Why is it when you checkout with GC the order stays in the shopping cart like you never purchased it has anyone an idea why it is doing this?

Help please!!!!!!

28 Aug 2008, 12:53 AM
#2670
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

OK. I have the solution to two problems. But unfortunately, I have no idea what is going on with alan_powerbrixx's error message. That is a strange one... 1.3.8 seems to work for me with this mod.

dscott1966 -- I had the same problem with the blank error page. See the earlier posts. The cart not clearing may just be something that the author overlooked. Not too huge of a deal. Not getting them in GC probably means something is wrong with responsehandler. Don't know what exactly, but that is the file I would be looking at. Also, are you sure you defined the responslehandler.php file in your GC account under Integration? Otherwise, GC doesn't know where to send the information to.

Here are the two problems I solved:

  1. Page stops loading when a customer is logged in and they go to their shopping cart page. This only happens when the shipping estimator is turned on for the shopping cart page AND a user is logged in. The problem is that orders.php is getting loaded twice when google checkout is used and the shipping estimator is used. To fix this problem, change these lines in /includes/modules/shipping_estimator.php:
// include the order class (uses the sendto !)
    require(DIR_WS_CLASSES . 'order.php');
    $order = new order;

You just need to comment these lines out, so the new code should look like:

// include the order class (uses the sendto !)
    // require(DIR_WS_CLASSES . 'order.php');
    // $order = new order;

PLEASE NOTE: This will break your shopping cart unless you use Google Checkout. So if you ever stop using google checkout, you will need to undo this change.

  1. Taxes don't work or you want to use more complicated tax rules. The bad news is that this mod has some serious tax flaws. The good news is that the author created some easy to use tax functions, so creating your own tax rules directly in the code is easy to do! Here's how to create your own tax rules:

In /googlecheckout/gcheckout.php, go the end of the file. You want to cut out the following code right under the line "// Tax options":

if(sizeof($tax_class_unique) == 1 && sizeof($module_info_enabled) == sizeof($tax_class)) {
  $tax_result =  $db->Execute( "select distinct countries_name, coalesce(zone_code, 'All Areas') zone_code, tax_rate, countries_iso_code_2
                               from " . TABLE_TAX_RATES . " as tr " .
                               " inner join " . TABLE_ZONES_TO_GEO_ZONES . " as ztgz on tr.tax_zone_id = ztgz.geo_zone_id " .
                               " inner join " . TABLE_COUNTRIES . " as c on ztgz.zone_country_id = c.countries_id " .
                               " left join " . TABLE_ZONES . " as z on ztgz.zone_id=z.zone_id
                               where tr.tax_class_id= '" .  $tax_class_unique[0] ."'");
  $num_rows = $tax_result->RecordCount();
  $tax_rule = array();

  for($j=0; $j<$num_rows; $j++) {
    $tax_result->MoveNext();
    $rate = ((double) ($tax_result->fields['tax_rate']))/100.0;
    $GDtaxRule = new GoogleDefaultTaxRule($rate, 'true');
		if($tax_result->fields['countries_iso_code_2'] == 'US') {
			if($tax_result->fields['zone_code'] == 'All Areas') {
        $GDtaxRule->SetCountryArea('ALL');
			}
			else {
        $GDtaxRule->SetStateAreas($tax_result->fields['zone_code']);
			}
		}
		else {
      $GDtaxRule->AddPostalArea($tax_result->fields['countries_iso_code_2']);
		}      			
    $Gcart->AddDefaultTaxRules($GDtaxRule);
  }
} else {
  $GDtaxRule = new GoogleDefaultTaxRule(0, 'false');
  $GDtaxRule->SetWorldArea(true);
  $Gcart->AddDefaultTaxRules($GDtaxRule);
}

if(sizeof($tax_class_unique) > 1 || (sizeof($tax_class_unique) == 1 && 
   sizeof($module_info_enabled) != sizeof($tax_class) ))  {
  $Gcart->SetButtonVariant(false);
  $Gwarnings[] = GOOGLECHECKOUT_STRING_WARN_MULTIPLE_SHIP_TAX;
}

You can just comment this out if you don't to remove it by adding /* to the beginning and */ to the end of this.

Then, you want to create your own tax rules to replace this code. Here is the basic format to do so:

$GDtaxRule = new GoogleDefaultTaxRule('.0725', 'false');
$GDtaxRule->SetStateAreas('CA');
$Gcart->AddDefaultTaxRules($GDtaxRule);

This would create a 7.25% tax for all of California. Change the rate to anything you want. The false that follows it means that tax will not be calculated for shipping -- only the products. Change to true if shipping should be taxed. Then, the SetStateAreas allows you to select a state that is taxed. For multiple states, use an array. Use the two character state code, ex: OR=Oregon.

If you want to define the tax rules by zip code, change SetStateAreas function to SetZipPatterns. You can use * as a wildcard, so the following code would tax someone at 5% including shipping for anyone at zip codes beginning with 11:

$GDtaxRule = new GoogleDefaultTaxRule('.05', 'true');
$GDtaxRule->SetZipPatterns('11*');
$Gcart->AddDefaultTaxRules($GDtaxRule);

You can also use an array for the zip patterns function, allowing you to pick and choose zip codes from your county, or create other complicated zip code by zip code tax rules.

If you define two areas that have some overlap, the first definition has priority. So, in this example, I have created an array with all the zip codes in Los Angeles County. LA County gets charged 8.25%. The rest of California gets charged 7.25%. I must put LA Country first, otherwise all of California, including LA County, will get charged 7.25% because the first definition has priority in a conflict:

$GDtaxRule = new GoogleDefaultTaxRule('.0825', 'false');
$GDtaxRule->SetZipPatterns(array(90001,90002,90003,90004,90005,90006,90007,90008,90009,90010,90011,90012,90013,90014,90015,90016,90017,90018,90019,90020,90021,90022,90023,90024,90025,90026,90027,90028,90029,90030,90031,90032,90033,90034,90035,90036,90037,90038,90039,90040,90041,90042,90043,90044,90045,90046,90047,90048,90049,90050,90051,90052,90053,90054,90055,90056,90057,90058,90059,90060,90061,90062,90063,90064,90065,90066,90067,90068,90069,90070,90071,90072,90073,90074,90075,90076,90077,90078,90079,90080,90081,90082,90083,90084,90086,90087,90088,90089,90091,90093,90094,90095,90096,90101,90102,90103,90189,90201,90202,90209,90210,90211,90212,90213,90220,90221,90222,90223,90224,90230,90231,90232,90233,90239,90240,90241,90242,90245,90247,90248,90249,90250,90251,90254,90255,90260,90261,90262,90263,90264,90265,90266,90267,90270,90272,90274,90275,90277,90278,90280,90290,90291,90292,90293,90294,90295,90296,90301,90302,90303,90304,90305,90306,90307,90308,90309,90310,90311,90312,90313,90397,90398,90401,90402,90403,90404,90405,90406,90407,90408,90409,90410,90411,90501,90502,90503,90504,90505,90506,90507,90508,90509,90510,90601,90602,90603,90604,90605,90606,90607,90608,90609,90610,90623,90630,90631,90637,90638,90639,90640,90650,90651,90652,90659,90660,90661,90662,90665,90670,90701,90702,90703,90704,90706,90707,90710,90711,90712,90713,90714,90715,90716,90717,90723,90731,90732,90733,90734,90744,90745,90746,90747,90748,90749,90755,90801,90802,90803,90804,90805,90806,90807,90808,90809,90810,90813,90814,90815,90822,90831,90832,90833,90834,90835,90840,90842,90844,90845,90846,90847,90848,90853,90888,91001,91003,91006,91007,91009,91010,91011,91012,91016,91017,91020,91021,91023,91024,91025,91030,91031,91040,91041,91042,91043,91046,91066,91077,91101,91102,91103,91104,91105,91106,91107,91108,91109,91110,91114,91115,91116,91117,91118,91121,91123,91124,91125,91126,91129,91131,91175,91182,91184,91185,91186,91187,91188,91189,91191,91201,91202,91203,91204,91205,91206,91207,91208,91209,91210,91214,91221,91222,91224,91225,91226,91301,91302,91303,91304,91305,91306,91307,91308,91309,91310,91311,91312,91313,91316,91321,91322,91324,91325,91326,91327,91328,91329,91330,91331,91333,91334,91335,91337,91340,91341,91342,91343,91344,91345,91346,91350,91351,91352,91353,91354,91355,91356,91357,91361,91362,91363,91364,91365,91367,91371,91372,91376,91380,91381,91382,91383,91384,91385,91386,91387,91388,91390,91392,91393,91394,91395,91396,91399,91401,91402,91403,91404,91405,91406,91407,91408,91409,91410,91411,91412,91413,91416,91423,91426,91436,91470,91482,91495,91496,91497,91499,91501,91502,91503,91504,91505,91506,91507,91508,91510,91521,91522,91523,91601,91602,91603,91604,91605,91606,91607,91608,91609,91610,91611,91612,91614,91615,91616,91617,91618,91702,91706,91709,91711,91715,91716,91722,91723,91724,91731,91732,91733,91734,91735,91740,91741,91744,91745,91746,91747,91748,91749,91750,91754,91755,91756,91759,91765,91766,91767,91768,91769,91770,91771,91772,91773,91775,91776,91778,91780,91788,91789,91790,91791,91792,91793,91795,91801,91802,91803,92397,93243,93510,93523,93532,93534,93535,93536,93539,93543,93544,93550,93551,93552,93553,93560,93563,93584,93586,93590,93591,93599));
$Gcart->AddDefaultTaxRules($GDtaxRule);

$GDtaxRule = new GoogleDefaultTaxRule('.0725', 'false');
$GDtaxRule->SetStateAreas('CA');
$Gcart->AddDefaultTaxRules($GDtaxRule);

There are several other functions you can use, but Zip Code and State were the most useful for me. The list of function includes:

SetStateAreas
SetZipPatterns
AddPostalArea
SetWorldArea
SetCountryArea

You can infer what these functions do if you poke around where they are defined. You will find them all in /googlecheckout/library/googletax.php.

I hope someone finds this useful.

28 Aug 2008, 2:25 AM
#2671
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

dscott1966:

Ok i'm having a couple of weird problems here, hope someone can help me.

Problem #1, When you checkout with GC i'm not getting the orders back into ZC i went through this whole post and still cannot solve the problem. I'm getting them in GC just not in ZC.

Problem #2, Why is it when you checkout with GC the order stays in the shopping cart like you never purchased it has anyone an idea why it is doing this?

Help please!!!!!!

Problem #1: (a.) Do you have SSL? If you do not, Google will not return order info to your cart.

(b.) Are you getting any errors reported by Google? You would have to look in your Google account page. These may help pinpoint the problem if it is not (a).

Problem #2: Should be solved when Problem #1 is solved. Your cart does not have the completed order info, so it doesn't know to remove the items from the shopping cart.

28 Aug 2008, 3:21 AM
#2672
dscott1966 avatar

dscott1966

Zen Follower

Join Date:
Apr 2005
Posts:
298
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Srturner47 and Chain_man,

I want to thank you both for all your help.

Srtuner47,
I did see the post about the blank page and used my wifes account and that did the trick. I will try your other fixes and let you know how they work. Again thank you for your help.

Chain_Man,

I want to thank you for your help. I do not have ssl installed yet, I thought for testing purposes with the GC sandbox you did not need it, but i will jump on it first thing in the morning. I have not seen any errors, but i also don't know where to look for the errors in GC i have looked for where they could be but don't see any, But thank you so much for your in put and i will give it a try.

Thank you both will let you both know how it comes out.

28 Aug 2008, 2:05 PM
#2673
chain_man avatar

chain_man

Zen Follower

Join Date:
Dec 2005
Location:
Box Elder, SD
Posts:
375
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

dscott1966:

I thought for testing purposes with the GC sandbox you did not need it, but i will jump on it first thing in the morning. I have not seen any errors, but i also don't know where to look for the errors in GC i have looked for where they could be but don't see any

You are correct, you do not need ssl for testing in sandbox.

One more thought: Be sure you have XML checked as your callback method.

30 Aug 2008, 3:30 AM
#2674
meknownowt avatar

meknownowt

New Zenner

Join Date:
Dec 2007
Posts:
78
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

267 pages. does someone not feel like breaking this down into segments, it is a lot when you are looking for answers.

I have tried reading as much as I can but there is a lot so I will keep going.

Is there a way to turn off the google postage, so it only uses the zen cart postage?

30 Aug 2008, 5:05 PM
#2675
sean046 avatar

sean046

Inactive

Join Date:
Feb 2004
Posts:
42
Plugin Contributions:
1

Re: Google Checkout module for ZC 1.3.x (beta)

meknownowt:

Is there a way to turn off the google postage, so it only uses the zen cart postage?

I'd like to know if this is possible too - it will just NOT accept my postage module.

2 Sep 2008, 1:25 AM
#2676
meknownowt avatar

meknownowt

New Zenner

Join Date:
Dec 2007
Posts:
78
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

If no one has the answer has anyone made a good help file on setting up the postage for google checkout?

I have noticed the question pop up a lot while reading through this topic, but have yet to see an answer.

2 Sep 2008, 6:01 AM
#2677
soid avatar

soid

New Zenner

Join Date:
Sep 2008
Posts:
1
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Hey guys,

I see good help on these 268 pages but I don't have any ideas about how to search here?

Could not you just refer me? I have the message:
"Sorry, we are not accepting payments from your region at this time."

I'm using only GC payment module latest version 1.4.7RC1 as well as Zen-Cart 1.3.8a.
I googled about 1 hour but didn't find any helpful info :-(

2 Sep 2008, 9:21 AM
#2678
meknownowt avatar

meknownowt

New Zenner

Join Date:
Dec 2007
Posts:
78
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

soid:

Hey guys,

I see good help on these 268 pages but I don't have any ideas about how to search here?

Could not you just refer me? I have the message:
"Sorry, we are not accepting payments from your region at this time."

I'm using only GC payment module latest version 1.4.7RC1 as well as Zen-Cart 1.3.8a.
I googled about 1 hour but didn't find any helpful info :-(

Do you have any free post items on your cart? As I found these on the search above

http://www.zen-cart.com/forum/showthread.php?t=78078&highlight=Sorry%2C+payments+region+time

http://www.zen-cart.com/forum/showthread.php?t=56960&highlight=Sorry%2C+payments+region+time

And both seem to point to free postage items causing a problem

2 Sep 2008, 1:56 PM
#2679
alan_powerbrixx avatar

alan_powerbrixx

New Zenner

Join Date:
Jul 2007
Location:
Durham, NC
Posts:
56
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

srturner47:

You just need to comment these lines out, so the new code should look like:

// include the order class (uses the sendto !)
// require(DIR_WS_CLASSES . 'order.php');
// $order = new order;

> 
> PLEASE NOTE:  This will break your shopping cart unless you use Google Checkout.  So if you ever stop using google checkout, you will need to undo this change.

Here's a possibly dumb question from a relative php novice: Would it work to change the require to require_once instead of commenting out these lines? Unless I missed something, it looks as if includes/class/order.php contains a class definition and several functions, but no main-line executable code.  Is there a hidden problem lurking here if require_once were used? If that would do the job, then it wouldn't break if Google Checkout were removed.

I would try it myself to see, but (not to belabor the point) I can't install Google Checkout on my test site for reasons already mentioned on this thread.
2 Sep 2008, 2:13 PM
#2680
alan_powerbrixx avatar

alan_powerbrixx

New Zenner

Join Date:
Jul 2007
Location:
Durham, NC
Posts:
56
Plugin Contributions:
0

Re: Google Checkout module for ZC 1.3.x (beta)

Actually, I did try require_once in production for a moment, and it did appear to work. Again, I don't know if it would open up some hidden problems not apparent on a quick novice-level perusal of the code and a simple one-time test. The only problem for me is that the on-page shipping estimates push the Google Checkout and PayPal buttons down low on the shopping cart page, so I'd have to go diving into the code to rearrange the layout. So for now, I've set it back to the pop-up estimator button, until my boss weighs in on his preferences.