Zen Cart Logo
Forums / All Other Contributions/Addons / VAT-mod for European companies

VAT-mod for European companies

Views: 114,578

Results 21 to 40 of 362
31 May 2006, 10:28 AM
#21
beez avatar

beez

Zen Follower

Join Date:
Sep 2005
Location:
Malmö, Sweden
Posts:
117
Plugin Contributions:
4

VAT-mod for European companies

cdaugustin:

Hi, i will atempt to install this nice looking mod on my zen 3.0.1 :).

PS: in case i fail, are there any alternatives to this mod?

Ok, good luck!

The only alternative I know of is to set up zones and taxes and create discount groups and handle the European companies that shouldn't have VAT added manually. I've got to work before I started with this mod, so it can be done, but not as neat as this mod :wink2:

31 May 2006, 10:35 AM
#22
cdaugustin avatar

cdaugustin

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,

Back with news :). Ive succeded to install the mod (at least thats what i think). I am not sure where i can see the mod in action (but i was able to configure it from the admin). So now im testing payments with the protx module (i have also have installed a SEO module with some tweaks).

Thanks for the mod i hope everything works just right.

Augustin.

PS: if anyone is interested on how to make the SEO module (the Chemos) one work with everything send a message (i have modified it so that only the seo-pages actually get their links rewriten. This fixed my multiple image problem/login/checkout etc problem --> i was getting redirected to index).

31 May 2006, 10:53 AM
#23
beez avatar

beez

Zen Follower

Join Date:
Sep 2005
Location:
Malmö, Sweden
Posts:
117
Plugin Contributions:
4

Re: VAT-mod for European companies

cdaugustin: Glad you liked it! While you're at it down load the latest version 1.1, uploaded today. It adds some functionality...

31 May 2006, 11:08 AM
#24
cdaugustin avatar

cdaugustin

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

Re: VAT-mod for European companies

Yello,

wheres the link ? :) if it has the file size is 127052 (of the zip) then its the one ive using now (ive downloaded it this morning).

Augustin

31 May 2006, 11:14 AM
#25
cdaugustin avatar

cdaugustin

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,

One more thing: where do i see the VAT kick in? (ive set my user country to be in Finland (added all the tax rate and stuff)). But it seems it wont charge be the 10% extra.

thanks,

31 May 2006, 11:38 AM
#26
beez avatar

beez

Zen Follower

Join Date:
Sep 2005
Location:
Malmö, Sweden
Posts:
117
Plugin Contributions:
4

Re: VAT-mod for European companies

The latest version is 1.1, see the top of the txt-file... I've uploaded it around 12.20PM today... You can get it here: http://www.sweetfabrik.se/ZC/VAT-mod_130.zip Version 1.1 is 127118 bytes.

You should see the tax in the checkout, but it's crucial that the Tax Rates are configured right. You can look in the Install_130.txt (the 1.1 version) at the bottom to see how I configured mine. It's kind of tricky so try different settings and the priority of the Tax Rates seems to matter...

31 May 2006, 12:24 PM
#27
pivey avatar

pivey

Zen Follower

Join Date:
Mar 2006
Posts:
192
Plugin Contributions:
0

Re: VAT-mod for European companies

Beez, you are a Genius :yes:

Thank you

31 May 2006, 12:27 PM
#28
cdaugustin avatar

cdaugustin

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,
I am using the latest version and Ive configured it exactly the way you told us in the text file (I will double and triple check that right now). But still the VAT is not appearing in the checkout nor on register new user altough it appears on the customer details in admin (i get a field to edit it).

:cry:

31 May 2006, 2:08 PM
#29
cdaugustin avatar

cdaugustin

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,

I have rechecked the zone and tax rates they are in place. Actually if I enable show prices with tax included they show up with tax in catalog. Problem is even if they show up with the tax when i add them to cart the tax goes away from the price. Before this ive atached all products to the tax class into which are the EU countries ...

Any ideas ?

Thanks

31 May 2006, 2:44 PM
#30
beez avatar

beez

Zen Follower

Join Date:
Sep 2005
Location:
Malmö, Sweden
Posts:
117
Plugin Contributions:
4

Re: VAT-mod for European companies

Can you specify your settings in Admin->Locations / Taxes->Zones Definitions, Tax Classes and Tax Rates. Is it in checkout that the tax goes away? Wow does it looks like?

For me I got just one tax class with is assign the the products. I have 3 Zone Definitions (EU, Sweden and World) and 3 Tax Rates (EU, Sweden and World) with priority 1, 2 and 3 (EU 1, Sweden 2 and World 3). EU and Sweden has the same Tax Rate and World has another. The World in both Zone Definitions and Tax Rates can be removed, it will then fall back to "TAX_UNKNOWN" for the countries not in the Zone Definitions for EU or Sweden. Are you with me?

1 Jun 2006, 7:06 AM
#31
cdaugustin avatar

cdaugustin

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,

Here are my zones definitions:
name: EU -- contains all countries in Eu except UK
United Kingdom contains only UK
Tax classes: EU tax

Tax rates: i have two of them: one for the EU zone, one for the United Kingdom zone. Both are under the EU tax class. The EU one has priority 3 the uk one has priority 1. First is 5% second is 10%.

If i have My Store: Display prices with TAX true --> prices will appear with their tax on the catalog. They will apear with the right tax value on the shopping cart and on the step 1 of the checkout. But the moment i get to step 2 the values go back to their untaxed values. (on step 3 Tax: 0 ).

Now the user im testing this with has both its shipping and billing address to Germany (which is under EU zone)

Also on the registration process and on my details on a user account the VAT field doesnt appear anywhere. Strangely it appears on the admin module when i edit a user.

Thanks for your patiance.

1 Jun 2006, 10:30 AM
#32
callumgilhooly avatar

callumgilhooly

New Zenner

Join Date:
Mar 2006
Posts:
4
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,

I've just installed this mod (great work by the way) and it almost works perfectly.

What's happening is:

When a user registers and puts their VAT number in the registration field, the registration appears to work fine but when that user goes to checkout, the vat appears. However, when I look at that users details in admin, the VAT number box is empty. As soon as I put the vat number in through admin, it works fine for the user and the vat is removed.

Why wouldn't the VAT number be captured during registration? I'm presuming I copied all the file across correctly as apart from this it works fine.

Any ideas?

Thanks

Callum

2 Jun 2006, 10:56 AM
#33
cdaugustin avatar

cdaugustin

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,
I have found the problem it seems you have a bug in the zen_tva_geo_tax() function in the /includes/classes/order.php file

here is the original function:

function zen_tva_geo_tax($tax_country_id, $billing_company, $billing_tva_intracom){
$tax_geo_zone_id = $this->zen_get_country_geo_zone_id($tax_country_id);
if($tax_country_id == STORE_COUNTRY ) return true; // store
if($tax_geo_zone_id == 0) return true; // no geo-zone
if($tax_geo_zone_id != 0 && !$billing_tva_intracom) return true; // geo-zone & no vat
elseif(!$billing_company && !$billing_tva_intracom) return false; // no vat
else return false;
}

Now i have observed that the function does not treat the case where there is actually a vat and a geo zone here is how i modified it and everything works perfect:

function zen_tva_geo_tax($tax_country_id, $billing_company, $billing_tva_intracom){
$tax_geo_zone_id = $this->zen_get_country_geo_zone_id($tax_country_id);
if($tax_country_id == STORE_COUNTRY ) return true; // store

/* geo-zone & vat --added by augustin /
if($tax_geo_zone_id != 0 && $billing_tva_intracom) return true;
/
end added by augustin*/

if($tax_geo_zone_id == 0) return true; // no geo-zone
if($tax_geo_zone_id != 0 && !$billing_tva_intracom) return true; // geo-zone & no vat
elseif(!$billing_company && !$billing_tva_intracom) return false; // no vat
else return false;
}

everything works just fine

4 Jun 2006, 3:25 PM
#34
vike avatar

vike

New Zenner

Join Date:
May 2006
Location:
Göteborg
Posts:
17
Plugin Contributions:
0

Re: VAT-mod for European companies

hi callum.
i cant seem to be able to reproduce your bug and without being able to see your code i dont think im no good on making any qualified guesses.. but as i think of it i come up with one step of debuging. =]

but first, could you be a little more specific about where in the checkout:

callumgilhooly:

the vat apears

anyway the file containing the mentioned error would be:

catalog/includes/modules/create_account.php

other files in the user-interface performing about the same is:
catalog/includes/modules/checkout_new_address.php and
catalog/includes/modules/pages/address_book_process/header_php.php

you should make sure also this code doesnt work in your current install by processing a vat-number (other than the one entered to be able to check the result) through the adressbook and adding a vat-number to a new adress through checkout.

but if that also doesnt work i can only ask, just be sure, about you using the 130 version of zencart? and if probably so the only idea i get is to try installing a zencart 130 distribution and then just simply replacing the installation files with the files from the modification and check if that works. if so you can somehow compare the installations and work from there.. =]

good luck!
vike

5 Jun 2006, 3:01 AM
#35
vike avatar

vike

New Zenner

Join Date:
May 2006
Location:
Göteborg
Posts:
17
Plugin Contributions:
0

Re: VAT-mod for European companies

hi augustin (and anyone interested)
good you found the place and could change it to suite you. :yes:

i have though now rewritten that function to get it more optimized. it needs testing and some consultation with beez before it can be put in a new release of the mod, but hopefully its doing the same as before. =] ive chosen not to hard-implement your request quite there, as im thinking it may not be a common reqest of execution.
accordingly, the new code will (perhaps) take no consideration of zone-definitions by default, but will possibly do through un-commenting some lines of code, or perhaps configure via the admin-interface.

more work also needs to be done to the work ive sat with all night - much of that late nights around this mod btw :D

beez is on semester for the week, and perhaps also that is why id gladly get some feedback on my resent changes/additions to the mod:

i have made use of a yet internal configuration-constant to choose whether, an unknown tax rate of 0% should be used for customers from countries not in any zone-definition (as zencart default behavior), or if it else should fall back on the products tax-configuration.

i cant really understand that default behavior to suddenly skip tax totaly if an undefined country buys a product. but then im no zencart administrator as beez, who said to me it could be good of use as an indication of missconfiguration.. but then whats the purpose of product tax at all, as it will allways be overridden by tax-rate-configuration if thats done correct? ..any one explaning that to me will get a free copy of our next release! ;D

but thatd be all of zen fer tonite. peace in the mornin lite!
vike

5 Jun 2006, 12:31 PM
#36
callumgilhooly avatar

callumgilhooly

New Zenner

Join Date:
Mar 2006
Posts:
4
Plugin Contributions:
0

Re: VAT-mod for European companies

Thanks Vike,

From the address book area, the adding of the VAT number worked so I have replaced the create_account pages and it appears to work fine now. Thanks for pointing me in the right direction (PHP/Zen novice here!)

Thanks again

Callum

10 Jun 2006, 3:13 PM
#37
pivey avatar

pivey

Zen Follower

Join Date:
Mar 2006
Posts:
192
Plugin Contributions:
0

Re: VAT-mod for European companies

Hello Beez,

I checked the VAT verification for Greece again...It does not work!
Works for all countries well.
Could you try it yourself? EL999943280 a valid TAX Number

I use your latest version.....

Cheers
Dimi

15 Jun 2006, 10:00 PM
#39
aspudden avatar

aspudden

Zen Follower

Join Date:
Dec 2004
Location:
Stockholm
Posts:
113
Plugin Contributions:
0

Re: VAT-mod for European companies

Nice Work !!
Will test soon ..

ASp

15 Jul 2006, 2:39 PM
#40
peterbkk avatar

peterbkk

Zen Follower

Join Date:
Jun 2006
Posts:
178
Plugin Contributions:
0

Re: VAT-mod for European companies

Anyone who have tested this VAT-mod together with Super-Order????