Re: Google Checkout module for Zen Cart (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?
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
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
Re: Google Checkout module for Zen Cart (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!
Re: Google Checkout module for Zen Cart (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!
Re: Google Checkout module for Zen Cart (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!
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
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.[Edit] 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.[/Edit]
Re: Google Checkout module for Zen Cart (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?
Re: Google Checkout module for Zen Cart (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!!!!!!
Re: Google Checkout module for Zen Cart (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:
Code:
// 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:
Code:
// 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.
2) 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":
Code:
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:
Code:
$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:
Code:
$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:
Code:
$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.
Re: Google Checkout module for Zen Cart (beta)
Quote:
Originally Posted by
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.