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

VAT-mod for European companies

Views: 114,578

Results 241 to 260 of 362
20 Sep 2009, 9:53 AM
#241
tirsys avatar

tirsys

New Zenner

Join Date:
Jun 2009
Posts:
26
Plugin Contributions:
0

VAT-mod for European companies

Hello to everyone! I need to set required the VAT numer entry during account creation. How can I do it?

cheers!

20 Sep 2009, 9:08 PM
#242
jazznuts699 avatar

jazznuts699

New Zenner

Join Date:
Jul 2009
Posts:
72
Plugin Contributions:
0

Re: VAT-mod for European companies

tirsys:

Hello to everyone! I need to set required the VAT numer entry during account creation. How can I do it?

cheers!

assuming you have this mod installed if you enable the VAT check then customers who put this in will get it checked:

admin > configuration > vat mod > Check the VAT number > true

however unless you have wholesale-only store i'm not sure you want the VAT# required as retail customers (or wholesale customers who do not have enough turnover to qualify for a VAT#) who do not have a VAT# will not be able to create an account.

26 Sep 2009, 7:17 PM
#243
jazznuts699 avatar

jazznuts699

New Zenner

Join Date:
Jul 2009
Posts:
72
Plugin Contributions:
0

Re: VAT-mod for European companies

my VAT mod is working funky all of a sudden... i had a customer from Germany order an item (no VAT# entered)... VAT tax was not calculated as it should have been.

i found that the field entry_tva_intracom in table address_book gets populated with NULL. This happens when the customer does not TAB through the form fields but clicks on them without clicking in the VAT Number field when registering.

does anyone know how to modify the code to auto include a   or something other than NULL when the strlen is less than 1???? it seems this mod does not function when NULL is populated.

if someone could point me to which file i should modify i could hack an if statememt like

if strlen(entry_tva_intracom)<1 then
entry_tva_intracom = entry_tva_intracom & " "
end if

27 Sep 2009, 3:48 PM
#244
jazznuts699 avatar

jazznuts699

New Zenner

Join Date:
Jul 2009
Posts:
72
Plugin Contributions:
0

Re: VAT-mod for European companies

problem fixed -- my create_account.php file was overridden with an older one without the VAT code. once i put the VAT code back in everything back to normal :) :oops:

note to self -- test all functionality of website before accepting a new mod works :) :frusty:

21 Jan 2010, 11:51 AM
#245
fision avatar

fision

New Zenner

Join Date:
Nov 2009
Posts:
7
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,

I have a problem. When I install all files, website is working but I can't get in admin area. When I go to admin I just get blank screen and that's it.

Do you have any suggestion what is wrong?

22 Jan 2010, 10:18 AM
#246
fision avatar

fision

New Zenner

Join Date:
Nov 2009
Posts:
7
Plugin Contributions:
0

Re: VAT-mod for European companies

I went instalation through file by file and found out that admin stop's working when I put on server file functions_vatmod.php
Does this make any sense?

One more thing in install instructions path for files is catalog/includes/... but in my zencart instalation there are all files listed but in folder includes and there isn't any folder catalog.

22 Jan 2010, 2:24 PM
#247
jazznuts699 avatar

jazznuts699

New Zenner

Join Date:
Jul 2009
Posts:
72
Plugin Contributions:
0

Re: VAT-mod for European companies

fision:

I went instalation through file by file and found out that admin stop's working when I put on server file functions_vatmod.php
Does this make any sense?

One more thing in install instructions path for files is catalog/includes/... but in my zencart instalation there are all files listed but in folder includes and there isn't any folder catalog.

'catalog' is the name of your main folder... for example mine is called 'shop' instead of 'catalog'... so my folder structure is D:\shop\includes....or D:\shop\admin\includes....

hope this helps

also for blank screen install this simple debug tool.... http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=860 then look at the logfile file that is created in your /cache/ folder

29 Jan 2010, 9:14 AM
#248
displaymannequin avatar

displaymannequin

New Zenner

Join Date:
Mar 2009
Location:
Netherlands
Posts:
5
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi, I'm really confused.
I installed VAT-mod_138a_v130 in a brand new zc install:
I have:

  1. installed VAT-mod_English via "install SQL Patches"
  2. added and replaced all the files
  3. replaced 'SI'=>'SI');//Slovania with 'SI'=>'SI', //Slovania (reply#236)
  4. Changed the last lines of the file
    zen-cart-v1.3.8a\includes\functions\extra_functions\functions_vatmod.php (reply#238)
  5. configured the shop according the install.txt
  6. even chmod includes\functions\extra_functions\functions_vatmod.php and admin\includes\functions\extra_functions\functions_vatmod.php to 777
  7. tested VAT number on http://ec.europa.eu/taxation_customs/vies/

and still got "Server is unable to check your VAT number: please, leave blank" when I add a customer with a VAT number on my test site: http://www.displaymannequin.nl/zc3
Can somebody please tell me what i have forgot to do or what i'm doing wrong? Thanks in advance!

29 Jan 2010, 3:36 PM
#249
bstbln avatar

bstbln

New Zenner

Join Date:
Jan 2010
Posts:
11
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,

I have Zen Cart 1.3.8a installed, with some security patches (see below).

Now I want to apply VAT-Mod v. 1.3.0 for Zen Cart v. 1.3.8a.

Just to be sure, I've made a diff with all the existing files, and now I found a place where two lines of a patched section are missing that existed in the original file, so I'm wondering if they were simply forgotten, or if they are not necessary any more.

In the file catalog/includes/modules/order_total/ot_shipping.php, in lines 71-72 of the original file, we have

$_SESSION['shipping_tax_description'] =  $shipping_tax_description;
$_SESSION['shipping_tax_amount'] =  $shipping_tax_amount;

but around the line 81 of the file version that comes with VAT-Mod, these two lines are missing.

Are they important? :blink:

Bernhard

Installed Security patches:

http://www.zen-cart.com/forum/showthread.php?t=102802
http://www.zen-cart.com/forum/showthread.php?t=108428
http://www.zen-cart.com/forum/showthread.php?t=130161 ** ESPECIALLY IMPORTANT
http://www.zen-cart.com/forum/showthread.php?t=130701
http://www.zen-cart.com/forum/showthread.php?t=142784 ** ESPECIALLY IMPORTANT
http://www.zen-cart.com/forum/showthread.php?t=142927

Not security problem: Display of English and German product names on the left "new product" box.
http://www.zen-cart.com/forum/showpost.php?p=616420&postcount=26

10 Mar 2010, 2:48 PM
#250
tsantilk avatar

tsantilk

New Zenner

Join Date:
Oct 2008
Posts:
1
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi,

I've too experienced problems with the vat verification. I was keep getting the "Server is unable to check your VAT number: please, leave blank" on every registration.
Turned out for me that i had problem with the file_get_contents function on the functions_vatmod.php (both include and admin folder). My server would not allow this function to operate. So i decided to change that function with an alternative. Hope this will help others too that experienced the same problem with me. Below i provide the changes i've made so that vat verification to work for me. Please correct me if i've made any mistake.

ON BOTH FILES functions_vatmod.php REPLACED

// 071205 BEGIN

$opts = array(
 'http'=>array(
   'method'=>"GET",
    'content'=>"iso=".$prefix."&ms=".$prefix."&vat=".$tva));

$context = stream_context_create($opts);

// 071205 END

$monfd = file_get_contents('http://ec.europa.eu/taxation_customs/vies/viesquer.do', null, $context); // 071205

if ( eregi("invalid VAT number", $monfd) ) {
return 'false';
} elseif ( eregi("valid VAT number", $monfd) ){
return 'true';
} else {
$myVerif = 'no_verif';
}

WITH

$streamurl = "http://ec.europa.eu/taxation_customs/vies/viesquer.do?iso=".$prefix."&ms=".$prefix."&vat=".$tva;

$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $streamurl);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$monfd = curl_exec($ch);
if ( stristr($monfd, 'invalid VAT number') ) {
return 'false';
} elseif ( stristr($monfd, 'valid VAT number') ){
return 'true';
} else {
$myVerif = 'no_verif';
}
curl_close($ch);

I replaced eregi function too with stristr since eregi has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0

13 Mar 2010, 9:12 PM
#251
tphoare avatar

tphoare

New Zenner

Join Date:
Sep 2005
Location:
London
Posts:
88
Plugin Contributions:
0

Re: VAT-mod for European companies

Having just installed this mod all seems to be working fine except with customers already registered who are within the EU but with no VAT number. Logging in these customers still shows products as VAT free. Adding new customers since the mod was added does not show this problem - it is only the old non-VAT customers.

I have searched high and low in this thread for any reference to this but can't find anything - other than a problem some time ago where this problem occurred the whole time - and I have applied the changes and that was fixed.

Any suggestions?

13 Mar 2010, 9:57 PM
#252
tphoare avatar

tphoare

New Zenner

Join Date:
Sep 2005
Location:
London
Posts:
88
Plugin Contributions:
0

Re: VAT-mod for European companies

Actually I've sorted this. It's obviously to do with the addition of a null VAT field to the address table. Simply going into the Customer screen of any previous non-VAT customer and then leaving the screen by pressing 'update' solves the problem. Since we have very few non-VAT customers this is not a problem.

Cheers

27 Mar 2010, 3:13 PM
#253
bstbln avatar

bstbln

New Zenner

Join Date:
Jan 2010
Posts:
11
Plugin Contributions:
0

Re: VAT-mod for European companies

TPHoare:

Actually I've sorted this. It's obviously to do with the addition of a null VAT field to the address table. Simply going into the Customer screen of any previous non-VAT customer and then leaving the screen by pressing 'update' solves the problem. Since we have very few non-VAT customers this is not a problem.

Thank you thank you thank you :) You helped me solving another problem I wrote about here: If a customer uses Paypal Express to send us their address, they are not charged the VAT even if they should be charged - in contrast to users that create an account on the shop first and then go to Paypal.

The problem seems to be that the default value for the VAT field should be '', but not NULL.

Maybe changing this in the VAT-mod_English.sql file, e.g.

ALTER TABLE address_book ADD entry_tva_intracom VARCHAR(32) [B]DEFAULT ''[/B] AFTER entry_company;

or changing this later manually, with

ALTER TABLE `address_book` CHANGE `entry_tva_intracom` `entry_tva_intracom` VARCHAR( 32 ) CHARACTER SET latin1 COLLATE latin1_german2_ci NULL [B]default ''[/B]

solves the problem. Well, it did it for me - but I hope this doesn't produce any unexpected side-effects...

If you change the VAT-mod_English.sql file and apply it then to an old address table (which does not contain the VAT field), I assume that the fields are converted correctly, so you don't need to go to the admin area and iterate over the customer entries.

I'm not a professional php programmer, and I don't really know the ZEN system, but from the code in the checkout_new_address.php in the includes/modules folder of the VAT patch, I understand that the default value that is saved to the VAT-field in the database if the user does not enter a VAT on the account creation page is indeed '', not null.

But I haven't tested this extensively, it just seems to work e.g. if I let a french customer who is not a company buy in a German shop. Maybe someone who is more familiar with this could verify that my solution is clean...

Bernhard

16 May 2010, 6:20 AM
#254
hrinfo avatar

hrinfo

New Zenner

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

Re: VAT-mod for European companies

Hi everyone (hopefully is someone still around)

Thanks for the great mode. I have only question (at this stage :smile: ) in regards to the shipping tax calculation which I think it is related to this mode.

First the facts:

vatmod_for_european_companies_1-3-0
Zen Cart v1.38

Shipping modules DHL|GLS|TPGPost

Now when I go to the checkout the shipping shows fine including the tax but when i go to the payment page the shipping tax disappears although vat shows fine.

So any idea why does this may happen will be great.

You can see it for yourself here http://www.carmo.nl/store

The site is live so if you need to login to check it out please use any first name but second name use "testing" so that I can delete it.

Thanks

Tassos

17 May 2010, 3:53 PM
#255
aletiger avatar

aletiger

New Zenner

Join Date:
Apr 2010
Location:
Italy
Posts:
20
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi all,
I installed this mod and all works fine except for the fact that if a customer doesn't insert any VAT information, NO TAX is anyway applied to the price.

If I'am a private EU customer I need to view all the prices with TAX.
I missed something in the configuration of the mod or it doesn't do what I need?

Reading the instructions of the mod I understand that if the customer doesn't insert any VAT he will see the prices with TAX...

Thanks in advance :hug:

18 May 2010, 7:20 AM
#256
bstbln avatar

bstbln

New Zenner

Join Date:
Jan 2010
Posts:
11
Plugin Contributions:
0

Re: VAT-mod for European companies

Aletiger:

Hi all,
I installed this mod and all works fine except for the fact that if a customer doesn't insert any VAT information, NO TAX is anyway applied to the price.

If I'am a private EU customer I need to view all the prices with TAX.
I missed something in the configuration of the mod or it doesn't do what I need?

Reading the instructions of the mod I understand that if the customer doesn't insert any VAT he will see the prices with TAX...

Thanks in advance :hug:

Maybe the solution I posted above will help you: http://www.zen-cart.com/forum/showpost.php?p=862163&postcount=253

Bernhard

18 May 2010, 7:55 AM
#257
aletiger avatar

aletiger

New Zenner

Join Date:
Apr 2010
Location:
Italy
Posts:
20
Plugin Contributions:
0

Re: VAT-mod for European companies

BStBln:

Maybe the solution I posted above will help you: http://www.zen-cart.com/forum/showpost.php?p=862163&postcount=253

Bernhard

Hi Bernhard, the problem is the same: if I register to the shop as an EU customer without VAT the prices are without TAX that is wrong.
A private EU customer must pay my products with TAX included.

Any suggestions? :no:

19 May 2010, 6:33 AM
#258
bstbln avatar

bstbln

New Zenner

Join Date:
Jan 2010
Posts:
11
Plugin Contributions:
0

Re: VAT-mod for European companies

Aletiger:

Hi Bernhard, the problem is the same: if I register to the shop as an EU customer without VAT the prices are without TAX that is wrong.
A private EU customer must pay my products with TAX included.

Any suggestions? :no:

So after you applied the modification to the table, did you then register a new account or did you only test with the old one? The accounts that are registered already stay the same in the table, the ALTER TABLE... statement only applies to the creation of new accounts.

To convert old accounts, you could try something like this:

ALTER TABLE __ADDRESSBOOK__ SET entry_tva_intracom='' WHERE entry_tva_intracom IS NULL

Replace ADDRESSBOOK by the name of your address_book table, e.g. "zen_address_book" or just "address_book", if you didn't use prefixes. You have to look it up in the database.

Before you apply it, under all circumstances, make a backup of your database, so you will be able to restore it in case something goes wrong!

Hope this helps.

Bernhard

19 May 2010, 7:17 AM
#259
aletiger avatar

aletiger

New Zenner

Join Date:
Apr 2010
Location:
Italy
Posts:
20
Plugin Contributions:
0

Re: VAT-mod for European companies

Hi Bernhard, thanks for your reply.
I applied the change as you suggested, but I didn't solved the problem with private EU customer.

So finally I modified the code of another mod to fit to my needs.

Thanks again :clap:

21 May 2010, 2:31 PM
#260
hrinfo avatar

hrinfo

New Zenner

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

Re: VAT-mod for European companies

Aletiger:

Hi Bernhard, thanks for your reply.
I applied the change as you suggested, but I didn't solved the problem with private EU customer.

So finally I modified the code of another mod to fit to my needs.

Thanks again :clap:

Hi Aletiger,

Can you post your solution as I have the same problem?

Thanks

Tassos