nsirago:
Google Checkout Solution
I have only tested this for about 5 minutes but it worked every time. :) Give this a shot to incorporate this mod into your Google Checkout.
In gcheckout.php (on or around line 719 there is a SQL query, I changed mine to:
$tax_result = $db->Execute("SELECT
zen_tax_rates_local.local_tax_id,
zen_tax_rates_local.zone_id,
zen_tax_rates_local.local_fieldmatch,
zen_tax_rates_local.local_datamatch,
zen_tax_rates_local.local_tax_rate,
zen_tax_rates_local.local_tax_label,
zen_tax_rates_local.local_tax_shipping,
zen_tax_rates_local.local_tax_class_id
FROM
zen_tax_rates_local
WHERE
zen_tax_rates_local.local_datamatch = " . SHIPPING_ORIGIN_ZIP . "");
on or around line 743 you should see
$rate = ((double)($tax_result->fields['tax_rate']))/100.0;
change that to
$rate = ((double)($tax_result->fields['local_tax_rate']))/100.0;
I also got rid of a few lines. You won't be able to copy/paste my changes but this will definitely get you 80% there. I have pasted the entire foreach below. Modify as necessary. I'm doing zip code lookups. It will only work with zip codes.
foreach($tax_array as $tax_table) {
$tax_result = $db->Execute("SELECT
zen_tax_rates_local.local_tax_id,
zen_tax_rates_local.zone_id,
zen_tax_rates_local.local_fieldmatch,
zen_tax_rates_local.local_datamatch,
zen_tax_rates_local.local_tax_rate,
zen_tax_rates_local.local_tax_label,
zen_tax_rates_local.local_tax_shipping,
zen_tax_rates_local.local_tax_class_id
FROM
zen_tax_rates_local
WHERE
zen_tax_rates_local.local_datamatch = " . SHIPPING_ORIGIN_ZIP . "");
$num_rows = $tax_result->RecordCount();
$tax_rule = array();
$GAtaxTable = new GoogleAlternateTaxTable((!empty($tax_name_array[$i])?$tax_name_array[$i]:'none'), 'false');
for($j=0; $j<$num_rows; $j++) {
$tax_result->MoveNext();
$rate = ((double)($tax_result->fields['local_tax_rate']))/100.0;
$GAtaxRule = new GoogleAlternateTaxRule($rate);
$GAtaxRule->SetStateAreas("CA");
$GAtaxTable->AddAlternateTaxRules($GAtaxRule);
}
$i++;
$Gcart->AddAlternateTaxTables($GAtaxTable);
}
Sorry for the long quote, but this is the only post I can find related to local sales tax and Google Checkout.
I have ZC v 1.3.8a, Local Sales Tax 2.2 upgraded to 2.3, Google Checkout 1.4.7. Before I added the Local Sales Tax I was able to get to GC from my cart. With LST I get a page at GC that says:
:oops:"OOPS. We were unable to process your request."
I tried to implement this revision, changed zen_tax_rates_local to tax_rates_local since that is the current name of the table, and changed the SetStateAreas to "WA" since I am in Washington. I still get the OOPS message. I set the GC sort order to 99 thinking that might get to GC after calculating the tax. No luck there either.
Any help would be appreciated. I see a lot of other folks from Washington here with problems created by our tax structure.