Post by developer » Thu Feb 03, 2011 4:11 am

Hello all! I'm using OC 1.4.8b and Google Checkout.

Total price is included with tax and shipping. And when I go to checkout page for GC, I see another tax calculation from Google. I don't want it to be calculated again by Google. I set my tax settings to "You will not charge tax." at Google Merchant Center. There is no state to apply taxes. How I can fix that? Thanks.

User avatar
New member

Posts

Joined
Tue Jul 27, 2010 8:06 pm

Post by developer » Thu Feb 03, 2011 5:59 am

I'm also having a problem with shipping. When I proceed to Google Checkout page, shipping doesn't seem to be calculated. How can I fix that too?

User avatar
New member

Posts

Joined
Tue Jul 27, 2010 8:06 pm

Post by JNeuhoff » Thu Feb 03, 2011 6:31 am

developer wrote:Hello all! I'm using OC 1.4.8b and Google Checkout.

Total price is included with tax and shipping. And when I go to checkout page for GC, I see another tax calculation from Google. I don't want it to be calculated again by Google. I set my tax settings to "You will not charge tax." at Google Merchant Center. There is no state to apply taxes. How I can fix that? Thanks.
Need more details. I am unable to reproduce your error, works fine on my test server.

What are your Opencart tax rules (geo-zones, tax-classes)?

What is in your Google 'Setting > Tax setup'? Is it empty?

What is the URL of your website?

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by developer » Thu Feb 03, 2011 6:35 am

Hi again.

Tax rules: Only for NJ, VAT 7%.

Geo Zone: NJ, USA only.

Google Tax Setting: Empty at Merchant Center and Checkout Page.

There is PayPal button on the same page. It works well with total price. But GC Extension has a problem with my site. Shipping isn't calculated, tax is calculated again.

User avatar
New member

Posts

Joined
Tue Jul 27, 2010 8:06 pm

Post by JNeuhoff » Thu Feb 03, 2011 6:36 am

developer wrote:I'm also having a problem with shipping. When I proceed to Google Checkout page, shipping doesn't seem to be calculated. How can I fix that too?
What shipping methods are you using?

Are there any error messages in Google's 'Tools > Integration Console'?

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by developer » Thu Feb 03, 2011 6:39 am

Per Item Shipping Rate and Pickup from the Store.

I have only "Carts must contain at least one item." error at the console.

User avatar
New member

Posts

Joined
Tue Jul 27, 2010 8:06 pm

Post by JNeuhoff » Thu Feb 03, 2011 6:41 am

developer wrote:Hi again.

Tax rules: Only for NJ, VAT 7%.

Geo Zone: NJ, USA only.

Google Tax Setting: Empty at Merchant Center and Checkout Page.

There is PayPal button on the same page. It works well with total price. But GC Extension has a problem with my site. Shipping isn't calculated, tax is calculated again.
What's the URL of your site?
Can you set up a Google sandbox account so that I can test it?
I am unable to reproduce your error on my own test server.

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by developer » Thu Feb 03, 2011 6:46 am

I sent the URL as PM.

User avatar
New member

Posts

Joined
Tue Jul 27, 2010 8:06 pm

Post by developer » Thu Feb 03, 2011 7:06 am

Oops.. I started to get "Carts must contain at least one item" error.

User avatar
New member

Posts

Joined
Tue Jul 27, 2010 8:06 pm

Post by developer » Tue Feb 08, 2011 7:17 am

I'm still having the same error...

User avatar
New member

Posts

Joined
Tue Jul 27, 2010 8:06 pm

Post by kraftandjute » Wed Dec 14, 2011 3:45 am

hello! Just wondering if this issue has been resolved? We are having customers check out - and shipping is not being calculated. Neither is tax. Someone suggested that I go into the google settings.. (i had to update) - so i made sure we had PA 6% sales tax - but again, neither tax nor shipping is calculating.

Also - it cuts off our options - and we have to contact customer to see the options they chose.

Is there a fix? I have disabled google checkout right now, as we need to make sure the customer is paying shipping.

OpenCart version 1.5.1 www.KRAFTandJUTE.com

New member

Posts

Joined
Sat Oct 01, 2011 9:27 pm

Post by JNeuhoff » Wed Dec 14, 2011 7:07 am

kraftandjute wrote:hello! Just wondering if this issue has been resolved? We are having customers check out - and shipping is not being calculated. Neither is tax. Someone suggested that I go into the google settings.. (i had to update) - so i made sure we had PA 6% sales tax - but again, neither tax nor shipping is calculating.

Also - it cuts off our options - and we have to contact customer to see the options they chose.

Is there a fix? I have disabled google checkout right now, as we need to make sure the customer is paying shipping.

OpenCart version 1.5.1 http://www.KRAFTandJUTE.com
I am unable to reproduce any of your errors, so it looks like a configuration issue.If you send me a PM with your FTP and Opencart admin login details I can take a look at it.

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by vna822 » Mon Feb 06, 2012 8:36 am

I am having a similar problem with Google checkout tax calculation. I set my store so that tax is collected only for Massachusetts (MA). Everything works good on the store checkout. i.e. when someone from MA makes a purchase of a taxable product, the tax (6.25%) is added. But when someone from, say, Rhode Island (RI) makes the purchase, no tax is added. Now, when I use google checkout, for a MA taxable product, even with an RI address, the tax is being added. I have attached an image showing the three scenareos:
1. MA taxable product, Shipping address in MA -> Tax charged. (GOOD)
2. MA taxable product, Shipping address in RI -> Tax not charged. (GOOD)
3. MA taxable product, Shipping address in RI -> Tax charged in Google checkout ( BAD)

On the google checkout account, the Tax settings say:
--------------------------------------------------------------------
Tax settings

Create and manage your tax settings. These tax settings will only be applied to cart posts that do not already specify tax calculation rules. Learn more.
None entered - add your tax settings
--------------------------------------------------------------------

I tried looking into the file catalog/controller/checkout/gcheckout.php. I noticed that lines 467-472 and lines 485-489, where the "//Compute tax for this address id and shipping type" must be done are commented out. Here is that code snippet:

Code: Select all


//							if ($data[$root]['calculate']['tax']['VALUE'] == "true") {
//								//Compute tax for this address id and shipping type
//								$amount = 15; // Modify this to the actual tax value
//								$merchant_result->SetTaxDetails($amount);
//							}

There is a comment which says to modify the actual tax value but I am not sure how to do the coding for computing the tax based on which shipping state is returned by Google and appropriately compute that state tax. As always, you help is greatly appreciated.

I am using opencart 1.4.9.3

Attachments

googlecheckout-problem.png

Problem with Google Checkout Tax collection. - googlecheckout-problem.png (22.53 KiB) Viewed 2919 times


New member

Posts

Joined
Sat Mar 05, 2011 12:42 am

Post by JNeuhoff » Mon Feb 06, 2012 6:33 pm

vna822 wrote:I am having a similar problem with Google checkout tax calculation. I set my store so that tax is collected only for Massachusetts (MA). Everything works good on the store checkout. i.e. when someone from MA makes a purchase of a taxable product, the tax (6.25%) is added. But when someone from, say, Rhode Island (RI) makes the purchase, no tax is added. Now, when I use google checkout, for a MA taxable product, even with an RI address, the tax is being added. I have attached an image showing the three scenareos:
1. MA taxable product, Shipping address in MA -> Tax charged. (GOOD)
2. MA taxable product, Shipping address in RI -> Tax not charged. (GOOD)
3. MA taxable product, Shipping address in RI -> Tax charged in Google checkout ( BAD)
I took a look at it, and I think I found the bug. Can you try attached update for OpenCart 1.4.9.x please and let me know whether that one fixes your problem?

Attachments

Google Checkout for OpenCart 1.4.9.x


MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by vna822 » Tue Feb 07, 2012 12:39 am

Hi JNeuhoff,

Thank you so much for your super fast response. I greatly appreciate it. Your new files have fixed the Tax problem but they seem to have broken the shipping calculation now. I have attached the screen shot. You can see now that the shipping is simply $0.00 and not $4.99 like in my previous message screen shots.

Attachments

googlecheckout-problem2.png

googlecheckout-problem2.png (9.61 KiB) Viewed 2908 times


New member

Posts

Joined
Sat Mar 05, 2011 12:42 am

Post by JNeuhoff » Tue Feb 07, 2012 2:24 am

If you send me a PM with your OpenCart and FTP login details then I can further investigate.

At the moment, I can't find anything strange in the code.

Also, check your Integration Console in your Google Checkout account for any messages.

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by vna822 » Fri Feb 10, 2012 2:04 am

There are errors in the Google checkout Integration console. They are from when I had used the new code. Here are the error messages:


We encountered an error trying to access your server at https://www. -- the error we got is Sending failed with HTTP response code: 401. Response body was: Failed to Get Basic Authentication Headers


This seems to be happening only with the new code but not the old code. If possible could you please tell me in which exact file(s) you have found the tax bug. I want to try copying just the bug fix code into my current files and see if that works.

New member

Posts

Joined
Sat Mar 05, 2011 12:42 am

Post by JNeuhoff » Fri Feb 10, 2012 6:30 pm

vna822 wrote:There are errors in the Google checkout Integration console. They are from when I had used the new code. Here are the error messages:


We encountered an error trying to access your server at https://www. -- the error we got is Sending failed with HTTP response code: 401. Response body was: Failed to Get Basic Authentication Headers


This seems to be happening only with the new code but not the old code. If possible could you please tell me in which exact file(s) you have found the tax bug. I want to try copying just the bug fix code into my current files and see if that works.
I don't think the authentication error has anything to do with the bugfixes for the tax calculation.

Anway, I changed the file catalog/controller/checkout/gcheckout.php, around the following lines:

lines 98-99:

Code: Select all

				$zoneCode = (is_null($row['code'])) ? '' : $row['code'];
				if ($zoneCode=='') {
lines 146-147:

Code: Select all

				$zoneCode = (is_null($row['code'])) ? '' : $row['code'];
				if ($zoneCode=='') {
line 187:

Code: Select all

						$zoneCode = (is_null($row['code'])) ? '' : $row['code'];

The failed authentication takes place on lines 386-391:

Code: Select all

		$response->SetMerchantAuthentication( $merchantId, $merchantKey );
		$status = $response->HttpAuthentication();
		if (!$status) {
			error_log( "ControllerCheckoutGCheckout::callback authentication failed",3,DIR_LOGS."error.txt" );
			die('authentication failed');
		}

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by vna822 » Sun Feb 12, 2012 5:05 am

Those three changes have fixed the problem. Now, everything is working great. Thank you so much JNeuhoff. I greatly appreciate your prompt response.

New member

Posts

Joined
Sat Mar 05, 2011 12:42 am
Who is online

Users browsing this forum: No registered users and 3 guests