1. Created a new GEO Zone that has all the European member states so that a customer from any of these members states has the UK VAT rate applied.
2. Created a New Tax class, so that the above European Customers get charged the 17.5% on purchases
Now this seems to disable google checkout, I have proven this by removing the step 2 (deleting TAX CLASS) and the checkout becomes available again.
Can anyone advise, is this correct, a bug, or have I set something up wrong? I have to have step 1 & 2 in place.
Thanks for your help all.
Reason: Topic moved
Code: Select all
.........
// Make sure product's tax rules, if there, are compatible with Google Checkout
$rows = $this->model_checkout_gcheckout->findProductTaxRules( $this->cart->getProducts() );
foreach ($rows as $row) {
if ($row['iso_code_2']=='US') {
if (is_null($row['code'])) {
continue;
}
if ($this->model_checkout_gcheckout->isUSStateArea( $row['code'] )) {
continue;
}
}
else if ($row['iso_code_2']=='GB') {
if (is_null($row['code'])) {
continue;
}
} else
if (is_null($row['code'])) {
continue;
}
}
error_log( date('Y-m-d H:i:s - ', time())."ControllerModuleGCheckout::available: Product's tax rules not compatible for Google Checkout\n",3,DIR_LOGS."error.txt" );
return FALSE;
}
..........
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig

error logs read
2010-11-05 17:12:52 - ControllerModuleGCheckout::available: Product's tax rules not compatible for Google Checkout
Any thing else I can try ?
Code: Select all
......
// Make sure product's tax rules, if there, are compatible with Google Checkout
$rows = $this->model_checkout_gcheckout->findProductTaxRules( $this->cart->getProducts() );
var_dump($rows); exit;
.....
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Code: Select all
array(27) { [0]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "222" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "GB" ["code"]=> NULL } [1]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "117" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "LV" ["code"]=> NULL } [2]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "105" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "IT" ["code"]=> NULL } [3]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "103" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "IE" ["code"]=> NULL } [4]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "97" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "HU" ["code"]=> NULL } [5]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "84" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "GR" ["code"]=> NULL } [6]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "81" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "DE" ["code"]=> NULL } [7]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "73" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "FR" ["code"]=> NULL } [8]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "72" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "FI" ["code"]=> NULL } [9]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "67" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "EE" ["code"]=> NULL } [10]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "57" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "DK" ["code"]=> NULL } [11]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "56" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "CZ" ["code"]=> NULL } [12]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "55" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "CY" ["code"]=> NULL } [13]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "33" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "BG" ["code"]=> NULL } [14]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "21" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "BE" ["code"]=> NULL } [15]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(2) "14" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "AT" ["code"]=> NULL } [16]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "123" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "LT" ["code"]=> NULL } [17]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "124" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "LU" ["code"]=> NULL } [18]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "132" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "MT" ["code"]=> NULL } [19]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "150" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "NL" ["code"]=> NULL } [20]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "170" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "PL" ["code"]=> NULL } [21]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "171" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "PT" ["code"]=> NULL } [22]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "175" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "RO" ["code"]=> NULL } [23]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "189" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "SK" ["code"]=> NULL } [24]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "190" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "SI" ["code"]=> NULL } [25]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "195" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "ES" ["code"]=> NULL } [26]=> array(5) { ["tax_class_id"]=> string(1) "9" ["country_id"]=> string(3) "203" ["zone_id"]=> string(1) "0" ["iso_code_2"]=> string(2) "SE" ["code"]=> NULL } }
for reference, there is now one tax class that is applied to the European Geo Zone which include 26members states of Europe and UK.
I hope this helps?
You should not get this particular error message.
Send me a PM with with Opencart and FTP login details, so that I can further investigate.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Will take a day or so, is that ok ?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Took some time out to really understand what the code was doing, and think I have figured out the problem.
I have replaced the orginal code .....
Code: Select all
// Make sure product's tax rules, if there, are compatible with Google Checkout - ORGINAL
/*$rows = $this->model_checkout_gcheckout->findProductTaxRules( $this->cart->getProducts() );
foreach ($rows as $row) {
if ($row['iso_code_2']=='US') {
if (is_null($row['code'])) {
continue;
}
if ($this->model_checkout_gcheckout->isUSStateArea( $row['code'] )) {
continue;
}
}
else if ($row['iso_code_2']=='GB') {
if (is_null($row['code'])) {
continue;
}
}
error_log( date('Y-m-d H:i:s - ', time())."ControllerModuleGCheckout::available: Product's tax rules not compatible for Google Checkout\n",3,DIR_LOGS."error.txt" );
return FALSE;
}*/
Code: Select all
// Make sure product's tax rules, if there, are compatible with Google Checkout - FIXED
$rows = $this->model_checkout_gcheckout->findProductTaxRules( $this->cart->getProducts() );
foreach ($rows as $row) {
if ($this->model_checkout_gcheckout->isUSStateArea( $row['code'] )) {
continue;
} else if (is_null($row['code'])) {
continue;
}
error_log( date('Y-m-d H:i:s - ', time())."ControllerModuleGCheckout::available: Product's tax rules not compatible for Google Checkout\n",3,DIR_LOGS."error.txt" );
return FALSE;
}
I suspect that the
Code: Select all
if ($this->model_checkout_gcheckout->isUSStateArea( $row['code'] )) {
continue;
Is there anything I have missed or pit falls from my approach?
Cheers for your help.
Geoff
As I said, the following code should have worked, too:
Code: Select all
.........
// Make sure product's tax rules, if there, are compatible with Google Checkout
$rows = $this->model_checkout_gcheckout->findProductTaxRules( $this->cart->getProducts() );
foreach ($rows as $row) {
if ($row['iso_code_2']=='US') {
if (is_null($row['code'])) {
continue;
}
if ($this->model_checkout_gcheckout->isUSStateArea( $row['code'] )) {
continue;
}
}
else if ($row['iso_code_2']=='GB') {
if (is_null($row['code'])) {
continue;
}
} else
if (is_null($row['code'])) {
continue;
}
}
error_log( date('Y-m-d H:i:s - ', time())."ControllerModuleGCheckout::available: Product's tax rules not compatible for Google Checkout\n",3,DIR_LOGS."error.txt" );
return FALSE;
}
..........
Code: Select all
// Make sure product's tax rules, if there, are compatible with Google Checkout - FIXED
$rows = $this->model_checkout_gcheckout->findProductTaxRules( $this->cart->getProducts() );
foreach ($rows as $row) {
if (($row['iso_code_2']=='US') && ($this->model_checkout_gcheckout->isUSStateArea( $row['code'] ))) {
continue;
} else if (is_null($row['code'])) {
continue;
}
error_log( date('Y-m-d H:i:s - ', time())."ControllerModuleGCheckout::available: Product's tax rules not compatible for Google Checkout\n",3,DIR_LOGS."error.txt" );
return FALSE;
}
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Ill add your final bit of code and re-test, obviously the less deviation I make from your standard code the better!
Thanks for all your help and advice.
Geoff.
Users browsing this forum: No registered users and 7 guests