Zen Cart Logo
Forums / All Other Contributions/Addons / Google Base v Include and Exclude Tax in Prices (Nett/Gross)

Google Base v Include and Exclude Tax in Prices (Nett/Gross)

Views: 2,149

Results 1 to 9 of 9
25 Jul 2010, 12:38 AM
#1
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Google Base v Include and Exclude Tax in Prices (Nett/Gross)

If using Google Merchant Centre (formerly Google Base, nee Google froogle) you must send prices inclusive of tax and you must also display prices with tax on your site. Normally this isn't a problem as the googlefroogle.php looks up the setting for displaying prices with tax, and if that is 'true' then the tax is added to the prices in your feed.

However, if you have the Include and Exclude Tax in Prices mod installed, that has display price settings of 'false', 'true', 'inc/ex' and 'ex/inc' - but googlefroogle.php will ONLY add tax if the value is true...which gets you into trouble with Google eventually.

Two ways around this (assuming you want to use inc/ex or ex/inc) - either manually change the Display prices with tax to true before you run a feed, then change it back to your preferred inc/ex or ex/inc after the feed is created or, because that is really unworkable, edit includes/functions/functions_taxes.php. Find the function zen_add_tax (at about line 158) and then change if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ($tax > 0) ) { to ```
if ( (DISPLAY_PRICE_WITH_TAX != 'false') && ($tax > 0) ) {

3 Sep 2010, 4:27 PM
#2
chrisvcb avatar

chrisvcb

New Zenner

Join Date:
Aug 2010
Posts:
10
Plugin Contributions:
0

Re: Google Base v Include and Exclude Tax in Prices (Nett/Gross)

This helped me out no end. I was pulling out hair trying to find what was up with my Tax not showing till I stumbled across this.

Many many thanks.
Chris.

28 Oct 2010, 8:17 AM
#3
zebolon avatar

zebolon

New Zenner

Join Date:
May 2008
Posts:
12
Plugin Contributions:
0

Re: Google Base v Include and Exclude Tax in Prices (Nett/Gross)

Yes this works, but in the shopping cart sitebox the price without Tax is wrong. Replacing the old code, the shopping cart sitebox show correct prices without Tax.:blink:
It tooks me some time to find the problem, maybe there is another solution for that.

4 Apr 2011, 9:22 AM
#4
mikebackhouse avatar

mikebackhouse

New Zenner

Join Date:
Jan 2008
Posts:
37
Plugin Contributions:
0

Re: Google Base v Include and Exclude Tax in Prices (Nett/Gross)

I've been having to manually change my site to include tax every single time I've uploaded the google base file for the last 2 years! So this would be a lifesaver (especially as I want to get a cron job written to automatically upload it very soon)..

However.. your solution hasnt worked for me I'm afraid.

I've changed "if ( (DISPLAY_PRICE_WITH_TAX == 'false') && ($tax > 0) ) {"

But its still not including the products with TAX in the google feed..

Please Help! Our website will have 20,000+ products soon, updated daily so I really dont want to have to manually do this every day!!:blink:

4 Apr 2011, 9:27 AM
#5
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Google Base v Include and Exclude Tax in Prices (Nett/Gross)

It's not

_TAX == 'false'

it's

_TAX != 'false'

4 Apr 2011, 10:41 AM
#6
mikebackhouse avatar

mikebackhouse

New Zenner

Join Date:
Jan 2008
Posts:
37
Plugin Contributions:
0

Re: Google Base v Include and Exclude Tax in Prices (Nett/Gross)

You're a star!

I'm an idiot!:smile:

Thanks Ryk.. sorry to waste your time, I'm always missing silly little things like that..

5 Apr 2011, 9:32 AM
#7
mikebackhouse avatar

mikebackhouse

New Zenner

Join Date:
Jan 2008
Posts:
37
Plugin Contributions:
0

Re: Google Base v Include and Exclude Tax in Prices (Nett/Gross)

Ah... seems I have the same problem as zebolon, my shopping cart totals are showing the wrong totals now..

I've had to switch it back for the time being, any ideas please?

I guess there may be a way for forcing the google base feeder to add tax to all products?

20 Apr 2011, 11:16 AM
#8
mikebackhouse avatar

mikebackhouse

New Zenner

Join Date:
Jan 2008
Posts:
37
Plugin Contributions:
0

Re: Google Base v Include and Exclude Tax in Prices (Nett/Gross)

Has anyone got a solution to this please? I really need to get this sorted. We lose business if our google base feed expires and I wont want to remember have to manually upload every month if I can avoid it!

2 Nov 2011, 9:47 AM
#9
garethrooney avatar

garethrooney

New Zenner

Join Date:
Apr 2009
Posts:
54
Plugin Contributions:
0

Re: Google Base v Include and Exclude Tax in Prices (Nett/Gross)

Thought this was perfect, however I've noticed its adding tax on twice going through the checkout.