yes, also the ";" was an error, but I corrected it...
now the only thing not workink on me is the changements of profile: if I try to add/modify the european tax number, nothing changes in DB...:wacko:
Printable View
yes, also the ";" was an error, but I corrected it...
now the only thing not workink on me is the changements of profile: if I try to add/modify the european tax number, nothing changes in DB...:wacko:
Hmmm, for me everything works fine ...
How did you install the mod ??? (You wrote you installed 1.2.7, is that correct ???)
What I did is installing 1.2.8, then copying all template files from 1.2.7 into the templates folder and then create own language files (languages folder /german in my case ;) )
yes, also in my case I do that, but the site broken. then I deleted all module files and I try to install the previous version (1.3.7).
this version works for me, the only problem is the editing of the profile: I don't succeed to add/modify/delete the VAT number (in fact the VAT number inserted during registration, doesn't appears in the text field likes all others fields...)
I thinks wold be a problem of paths, but I'm not sure...
In fact after installing the module also the registration doesn't works, but I found the problem in a path:
at the begin I put the file "create_accout.php" under "includes/modules".
Now I put the same file under "includes/modules/classic" and all works...
this wold be the same or similar problem?
thanks for the support..
Francesco
Hi all,
I installed the mod and everything seems to work exept i don't get the vat number field when i want to create a new account
BE SURE to backup your template files before you do this!!!!!
It looks like the templates are missing in the VAT-mod version 128 dated Feb 04 2009 download, you will find the 3 .tpl files I use they may or may not work for you they will need to go into \includes\templates\YOUR_TEMPLATE\templates directory.
I have the same problem private customers also gets taxfree.
i have no idea why it does this, nothing seem to fault.
But if somebody really wants, pls explain in detail the zone configuration. Alltough i dont think this is the solution?
I think that the implementation of VAT made using only the ISO codes of countries in the EU may cause problems, in fact the case management that is of special areas that have the purpose of VAT shall be considered or not considered to belong to the EU is difficult. In this respect there is a link for these special cases to which to refer.
http://www.e-services.agenziaentrate...ote_iva-02.htm
Sorry for my bad English.
A small update to my problem, the problem is that it shows all my products taxfree, even when i have show tax in prices configured, this happens when i configure a company or private person from sweden. My own country is finland theres no problem with customers from finland.
hi all
every time I do a test purchase, the EU VAT is a new install, i get the below error, is anyone else having this problem?
'Server is unable to check your VAT number: please, leave blank'
Cheers
Matt
have you applyed this fix
Hey,
I just tried to install the mod and got a white screen too...
In my case the functions_vatmod.php is broken (in includes/... and admin/includes/...)
edit (from line 121 to end)
PHP Code:
'CZ'=>'CZ', //Czech Republic
'SI'=>'SI');//Slovania
'RO'=>'RO', //Romania
'BG'=>'BG'); //Bulgaria
return $intracom_array;
}
?>
to
PHP Code:
'CZ'=>'CZ', //Czech Republic
'SI'=>'SI', //Slovania
'RO'=>'RO', //Romania
'BG'=>'BG'); //Bulgaria
return $intracom_array;
}
?>
Is it me who cant configure this or is this a bug, but goddamit i cant get this to function correctly.
I have zj_black template installed. Private persons gets taxfree when from another Eu country, pls check this out somebody.
barkbit86 - i gave up trying to intstall this mod, has a few bugs in. i tried to get hold of the guys that developed it and asked if they would do, obvioulsy for payment, but had no reply from either of them.
In the end I got these guys to sort: http://www.waveriderdesign.com/
It is working now, although the VAT server is down a bit http://ec.europa.eu/taxation_customs/vies/vieshome.do and there is nothing that can be done about that - the module references the database on this site to validate VAT numbers
when you download the latest module, the pack doesn't contain the template files, these need to be downloaded from an earlier download pack
Apart from this it seems to work well, thanks to those who developed it.
Thank you Mattys, well it seemsl il just have to wait for better times :D
Help me, please!
I use VAT-mod_138a_v130 and this mod wrong verify VAT number (Poland).
In my shop I need VAT number, but I don't verification it.
In admin (VAT-Mod), in "Check the VAT number" set "false", but mod still verifing!?! Send red info about "wrong number"....
How I close (blocked) this verification (on create, modify etc)?
Please...
Best Regards to ALL
I think that I have found the solution:
Change the last lines of the file
zen-cart-v1.3.8a\includes\functions\extra_functions\functions_vatmod.php
from
if ($tva_intracom->fields['country_id'] === $store_country->fields['store_country']) {
return false;
} else {
return true;
to
if ($tva_intracom->fields['country_id'] === $store_country->fields['store_country']) {
return false;
} elseif ($tva_intracom->fields['tva_intracom'] === '') {
return false;
} else {
return true;
Nice AddOn
I want that customers which have an VAT-number can checkout with COD... All other customers without VAT-number can't
So a step to do that is to add a condition into the includes/modules/payment/cod.php
Something like this.
But this isn't the right condition. Who can help me with the right condition?Code:// disable the module if customers don't have an VAT-number
$verify_entry_btw = $db->Execute("select entry_tva_intracom from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $order_check->fields['customers_id']. "'");
if ($this->enabled == true) {
if (zen_not_null($order_check->fields['billing_tva_intracom'])) {
$this->enabled = false;
}
}
Solution is this:
findCode:// disable the module if the order only contains virtual products
if ($this->enabled == true) {
if ($order->content_type != 'physical') {
$this->enabled = false;
}
}
and insert next code
So now people with a right VAT-Number in their Billing-Address can pay with COD, customers without a VAT-Number in their billing-address can't pay with COD.Code:// disable only when billingaddress has a correct VAT-Number
$order_check = $db->Execute("select entry_tva_intracom
from " . TABLE_ADDRESS_BOOK . "
"); // TVA_INTRACOM
if ($this->enabled == true) {
if (zen_not_null($order_check->fields['entry_tva_intracom'])) {
$this->enabled = true;}
else {
$this->enabled = false;
}
}
Please help.
I am having a problem after installing Vat-Mod v.1.3.0 to zen-cart-v1.3.8a
admin/includes/functions/extra_functions/functions_vatmod.php on line 133
I have fixed line 130-132 easily. Problem is that I know nothing about programing.
Can anybody help me overcome this error with VatMod 138a V130
Parse error: syntax error, unexpected T_RETURN, expecting ')' in /home/netformi/public_html/store/admin/includes/functions/extra_functions/functions_vatmod.php on line 131
This is code in the file:
function zen_get_tva_intracom_array() {
$intracom_array = array('AT'=>'AT', //Austria
'BE'=>'BE', //Belgium
'DK'=>'DK', //Denmark
'FI'=>'FI', //Finland
'FR'=>'FR', //France
'FX'=>'FR', //France métropolitaine
'DE'=>'DE', //Germany
'GR'=>'EL', //Greece
'IE'=>'IE', //Irland
'IT'=>'IT', //Italy
'LU'=>'LU', //Luxembourg
'NL'=>'NL', //Netherlands
'PT'=>'PT', //Portugal
'ES'=>'ES', //Spain
'SE'=>'SE', //Sweden
'GB'=>'GB', //United Kingdom
'CY'=>'CY', //Cyprus
'EE'=>'EE', //Estonia
'HU'=>'HU', //Hungary
'LV'=>'LV', //Latvia
'LT'=>'LT', //Lithuania
'MT'=>'MT', //Malta
'PL'=>'PL', //Poland
'SK'=>'SK', //Slovakia
'CZ'=>'CZ', //Czech Republic
'SI'=>'SI',//Slovania
'RO'=>'RO', //Romania
'BG'=>'BG',//Bulgaria
return $intracom_array;)
}
?>
LINE 131 is return $intracom_array;)
Correction The Error is
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/netformi/public_html/store/admin/includes/functions/extra_functions/functions_vatmod.php on line 129
Code
This error shows up when trying to enter the admin section of the store.Code:function zen_get_tva_intracom_array() {
$intracom_array = array('AT'=>'AT', //Austria
'BE'=>'BE', //Belgium
'DK'=>'DK', //Denmark
'FI'=>'FI', //Finland
'FR'=>'FR', //France
'FX'=>'FR', //France métropolitaine
'DE'=>'DE', //Germany
'GR'=>'EL', //Greece
'IE'=>'IE', //Irland
'IT'=>'IT', //Italy
'LU'=>'LU', //Luxembourg
'NL'=>'NL', //Netherlands
'PT'=>'PT', //Portugal
'ES'=>'ES', //Spain
'SE'=>'SE', //Sweden
'GB'=>'GB', //United Kingdom
'CY'=>'CY', //Cyprus
'EE'=>'EE', //Estonia
'HU'=>'HU', //Hungary
'LV'=>'LV', //Latvia
'LT'=>'LT', //Lithuania
'MT'=>'MT', //Malta
'PL'=>'PL', //Poland
'SK'=>'SK', //Slovakia
'CZ'=>'CZ', //Czech Republic
'SI'=>'SI');//Slovania
'RO'=>'RO', //Romania (LINE 129)
'BG'=>'BG'); //Bulgaria
return $intracom_array;
}
Andrew
Hi,
I'm just starting a new zen 1.38a site. Looking at the install instructions for the VAT Mod there are references to catalog/includes......
Where do I find this "catalog" folder? Or do I have to create it?
regards
Peter Landon
This is a great Mod and one I am very pleased to find - thanks to the tauthor and to all those who have helped 'shape' it to work brilliantly.
I do have a question for anybody who would like to take on this challenge:
It clashes with another very useful mod I have, namely the referral mod (where did you hear about us.....) The main problem is that despite merging a file here and there, one of the new files with the VAT mod is getting the better of me and the referral entry box on the create account page is not showing. I think it has something to do with tpl_modules_create_account.php.
Is there anybody who can help me combine these two fine mods so that they both work?
Many thanks
Rob
Hi plandon
'catalog' simply refers to the directory you installed the main zencart files in.
For example..... public_html/ or public_html/store/, etc
Rob
Thanks. I should have figured that one out!
A bigger problem - I'm running the German language install of 1.38a and when I try to run the SQL file in PHPadmin I get an error message - #1146 - Table 'fn2010.configuration_group' doesn't exist.
Running it through Zen Cart interface gives:"1136 Column count doesn't match value count at row 1
in:
[INSERT INTO zen_configuration_group VALUES (27, "VAT-Mod", "VAT-Mod options", 27, 1);]"
Any idea how to get round this?
regards
Peter
Hi
Errr nope. Beyond my knowledge I am afraid. I am sure someone clever like Kim or whoever can sort this out quickly for you.
If I get any errors like this I usually try to run the sql querly again in 'bite sized chunks' to see if I can isolate the error - but that's my simpleton way of thinking.
Good luck
Rob
It seems that there are more than just a couple of differences between the UK and German installs. I'll just have to put up with a less than ideal B2B system for the time being.
Thanks anyway.
regards
Peter
As Kim will be tucked up in bed at the moment, I'm afraid you'll have to settle for whoever :wink:
The first error is because you're using a database prefix "zen_" about which phpMyAdmin knows nothing. However the Zen Cart SQL patch facility does, so you need to either edit the table names in the sql to iunclude your prefix, or run it via the SQL patch utility.
I'm not familiar with the German version, but I believe that it goes a little beyond mere linguistic variances and tweaks code and even (the 2nd error suggests) table structures. If you try the following through the phpMyAdmin you will hopefully fare betterQuote:
INSERT INTO zen_configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (27, "VAT-Mod", "VAT-Mod options", 27, 1);
You are clever too Kuroi and have indeed helped me out on many occassions - :)
No offence intended!
Rob
I got same problem at my store.
How can I make it calculate Gross and net correctly?
Module reguires to have 2 Taxable Goods settings EEC VAT Zone and local country (finland).
Both are set tax rate 22%. Problem seems it uses both tax rates in product edit form, therefore using tax 44%.
The quoted example takes 2 x 21% = 42%.
What is the fix?
Hi, I have just installed your VAT Module, I actually have my store in South Africa though, How do I set it up so that it doesn't check the VAT number, I just want the client to fill it in.
I have changes in admin->VAT-mod "check VAT number" to false and "Miniumum Numbers" to 0
What else do I need to change, Thank you for your help.
i had this error and i fixed it by removing the ');' from line 128 and replacing it with a ','.
looks like 2 extra countries were added after slovania :)Code:'CZ'=>'CZ', //Czech Republic
'SI'=>'SI',//Slovania
'RO'=>'RO', //Romania
'BG'=>'BG'); //Bulgaria
return $intracom_array;
Hello -- i had some problems with this mod when using group disounts. I found that there was a problem with the group discount logic and vat tax.
I found this post - http://www.zen-cart.com/forum/showthread.php?t=120341 which discussed the discount+tax problem and a possible solution (not related to the VAT mod). It looks like this problem propogates to the VAT mod. By modifying the code below i was able to get my discounts+vat to work properly.
This works in my version on zencart which is 1.3.8. please use at own risk -- create a backup of the files being modded before aplying this 'fix'. I am not a full time programmer thus i have not run this mod through X number of versions -- it works in my environment (php 5.2.5, apache 2.2.6, mysql 5.0.45, zen 1.3.8)
Please note in the 3rd file (ot_group_pricing.php) there is a line of code which is supposed to address group disounts which do not include shipping and tax to calculate the discount. I initially added this line in but it messed up the calculations. I was able to get the correct values by commenting this line out -- it works when i have both values to false in the group-disount mod.
I hope this helps someone as it definately helped me -- maybe if someone can test this thoroughly then it could be added to the next version of the VAT mod :).
in includes/classes/order.php
in includes/modules/order_total/ot_shipping.phpCode:'subtotal' => 0,
'shipping_tax'=>0, //added per http://www.zen-cart.com/forum/showthread.php?t=120341
'tax' => 0,
'total' => 0,
Code:// TVA_INTRACOM REPLACE BEGIN ..$calculated_tax = $shipping_tax_amount
}
}
$calculated_tax = zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
if($tva_tax){
$order->info['tax'] += $calculated_tax;
$order->info['tax_groups']["$shipping_tax_description"] += $calculated_tax;
$order->info['shipping_tax'] += $calculated_tax; //added as per http://www.zen-cart.com/forum/showthread.php?t=120341
$order->info['total'] += $calculated_tax;
}
if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
//}
// TVA_INTRACOM REPLACE END
in /includes/modules/order_total/ot_group_pricing.php
:clap:Code:function get_order_total() {
global $order;
$order_total_tax = $order->info['tax'];
$order_total = $order->info['total'];
if ($this->include_shipping != 'true') $order_total -= $order->info['shipping_cost'];
if ($this->include_shipping != 'true') $order_total_tax -= $order->info['shipping_tax']; //added per http://www.zen-cart.com/forum/showthread.php?t=120341
if ($this->include_tax != 'true') $order_total -= $order->info['tax'];
//if ($this->include_tax != "true" && $this->include_shipping != 'true') $order_total += $order->info['shipping_tax']; //adding this did not work for me total was incorrect
$orderTotalFull = $order_total;
$order_total = array('totalFull'=>$orderTotalFull, 'total'=>$order_total, 'tax'=>$order_total_tax);
return $order_total;
}
i wanted to make sure you do not miss the above fix (as i somehow did even though i went through all 24 pages) and install this into your VAT mod 1.3.0. the above makes sure that private parties in the EU are charged VAT tax. without this when selling in the EU only private parties in your home country are charged VAT tax (private parties outside of your home country in the EU are not charged VAT which is incorrect).
I wish to thank jazznuts699 for providing the fix for the functions_vatmod which was a real problem upgrading to 1.3.8 with latest vat mod.
We installed the vat module around 18 months ago and its worked fine since however since upgrade to 1.3.8 all european customers are not being charged vat.
For example I am based in UK and get charged vat at checkout, all products i view on main website show price with and without vat. If I change my delivery address to spain, france etc it still calculates the correct vat. But all old or new european customers are not being charged vat.
If any customer in europe places an order all products show the same price for incl and excl vat i.e. £1.00 excl vat / £1.00 incl vat and no vat is charged at checkout - even if a new european country address is added to the account no vat is charged.
ADDED - just to clarify the vat module works fine and shows the vat correctly as it should, just not doing that with european customers.
Martyn
Unfortunately is this for 100% correct. In this query it will look if the VAT-Number is in the address-book. Not especially for billing-address.
How can I do this, that is only for billing-address purpose?
Solution is this query (WHERE address_book_id = '" . (int)$_SESSION['billto'] . "'):
Code:$order_check = $db->Execute("select entry_tva_intracom
from " . TABLE_ADDRESS_BOOK . "
WHERE address_book_id = '" . (int)$_SESSION['billto'] . "'
"); // TVA_INTRACOM
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.
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
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:
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?
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?ma...roducts_id=860 then look at the logfile file that is created in your /cache/ folder
Hi, I'm really confused.
I installed VAT-mod_138a_v130 in a brand new zc install:
I have:
- installed VAT-mod_English via "install SQL Patches"
- added and replaced all the files
- replaced 'SI'=>'SI');//Slovania with 'SI'=>'SI', //Slovania (reply#236)
- Changed the last lines of the file
zen-cart-v1.3.8a\includes\functions\extra_functions\functions_vatmod.php (reply#238)- configured the shop according the install.txt
- even chmod includes\functions\extra_functions\functions_vatmod.php and admin\includes\functions\extra_functions\functions_vatmod.php to 777
- 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!
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 [FONT="Courier New"]catalog/includes/modules/order_total/ot_shipping.php[/FONT], in lines 71-72 of the original file, we have
but around the line 81 of the file version that comes with VAT-Mod, these two lines are missing.Code:$_SESSION['shipping_tax_description'] = $shipping_tax_description;
$_SESSION['shipping_tax_amount'] = $shipping_tax_amount;
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/showpo...0&postcount=26
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
WITHCode:// 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';
}
Code:$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
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?
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
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.
or changing this later manually, withCode:ALTER TABLE address_book ADD entry_tva_intracom VARCHAR(32) DEFAULT '' AFTER entry_company;
solves the problem. Well, it did it for me - but I hope this doesn't produce any unexpected side-effects...Code:ALTER TABLE `address_book` CHANGE `entry_tva_intracom` `entry_tva_intracom` VARCHAR( 32 ) CHARACTER SET latin1 COLLATE latin1_german2_ci NULL default ''
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
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
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/showpo...&postcount=253
Bernhard
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:
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.Code:ALTER TABLE __ADDRESSBOOK__ SET entry_tva_intracom='' WHERE entry_tva_intracom IS NULL
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
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 Just installed this now my Admin is blank... it initially worked, but I went to Modules -> Order Total and it was blank, now my whole admin is blank I cannot use it. Any ideas?
Thanks
Installing the debug tool shows this error:-
Cant believe its not working out of the box for a mod thats been there since Mar 12 2009!Code:PHP Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/mysite/public_html/shop/admin/includes/functions/extra_functions/functions_vatmod.php on line 129
In the above file there is an error. The array is prematurely closed at Slovania, this should be a comma:-
Change:-
ToCode:'CZ'=>'CZ', //Czech Republic
'SI'=>'SI');//Slovania
'RO'=>'RO', //Romania
'BG'=>'BG'); //Bulgaria
Code:'CZ'=>'CZ', //Czech Republic
'SI'=>'SI', //Slovania
'RO'=>'RO', //Romania
'BG'=>'BG'); //Bulgaria
I chose Finland to test this as my first VAT number, FI12345678 (FI + 8 characters) and it tells me "The VAT number does not match server request." and states I should use FI + 8 characters :frusty:
Had to switch check VAT number off.
I have the same problem as a few previous reported.... customers that do NOT enter a VAT number are not getting charged VAT. The VAT is shown in checkout but is £0. The suggested fix here did not fix it: http://www.zen-cart.com/forum/showpo...&postcount=253. So it is NOT to do with NULL being in the entry_tva_intracom field. I get this issue with new customers having an empty entry_tva_intracom field.
I am not sure what is going on, but I may have a fix, although dont know the implications...
In includes/functions/extra_functions/functions_vatmod.php on line 146 is this:-
I changed the last return true to return false, and it working now, but only four countries not in the store country:-Code:if ($tva_intracom->fields['country_id'] === $store_country->fields['store_country']) {
return false;
} else {
return true;
}
This is because in includes/functions/extra_functions/functions_taxes.php is the following line which was returning 0 as the zen_get_tax_rate() if the country was not equal to the store country.Code:if ($tva_intracom->fields['country_id'] === $store_country->fields['store_country']) {
return false;
} else {
return false;
}
Code:$tva_intracom_number = get_tva_intracom_number();
if ($tva_intracom_number === true && $_SESSION['customer_id']) {
return 0;
}
I dont quite understand this thing with comparing whether the person is in the store country or not because they pay VAT with no VAT number, or they dont pay VAT with a VAT number whether they are in the store country or not.
i have succesfully installed teh module. It works as it should.
VAT number included in the registration means prices without tax in the store and on teh invoice.
However, i am missing the customers VAT nummer on the invoice. And that is a legal obligation if i do not charge TAX on my invoice.
How can i have this automaticly included ( what did i do wrong, cause i thought this should automaticly be included )
Thanks
Hi all,
I have installed this mod with 1.3.9d, but it is not working during the check-out process. When I go to the check-out, until step 1/3 everything seems normal. In step 2 of 3 (payment method) I get a complete white screen.
When I put back the original datafiles this page is just loading again.
Does anybody know what can be the problem?
I have done the database update (now rows for tva* have been made) and done the other suggestion of changing both functions_vatmod.php files
I hope somebody can help me with this.
This mod is not compatible with Zen Cart 1.3.9e. It is only compatible with 1.3.8. DON'T INSTALL IT! :no:
Doing a simple copy and paste from the mod to the new 1.3.9 files does not work. I notice that tax calculation changed in the file /includes/classes/order.php
It is not working as expected. I am not a developer, so it is a bit hard for me to find out what I have to edit. Really, the tax calculation changed a bit and some new constant values have appeared.
As long as the problem with this mod is not fixed, I will not update my store from 1.3.8 to 1.3.9e.
Unfortunately, past events show that the developers of this mod are not reactive. We may wait a long time (a year) before a new version is released. :frusty:
No, you have simply erased new zen-cart 1.3.9 files with old zen-cart 1.3.8 files. And there are many changes in these codes as bug fixes and security fixes. You have deleted all these.
VAT-Mod BETA UNOFFICIAL for Zen Cart v. 1.3.9e
For Companies inside European Union
===========================
Remake and compatibility with Zen Cart v. 1.3.9e
Special edition done by dimjoula.
IMPORTANT NOTE: this is not the official release from Beez & Vike.
It is a *BETA* version. I did a copy and paste from the previous codes (VAT-Mod 1.3.0 for Zen Cart v. 1.3.8a) and paste them to Zen Cart v. 1.3.9e files. It works for me with my own personal configuration, but you should take it with care. IT MAY NOT WORK WITH YOUR OWN CONFIGURATION out of the box. Perhaps you will need to edit some files. If it is the case, please share it here.
BACKUP - BACKUP first your files and database before updating your store with these files. It may be buggy. You must know how to restore it!!!
What's new:
- PARTIAL (90%) Compatibility with Zen Cart v. 1.3.9e (but should be OK in most regular situations; potential problem when the customer uses several different addresses located in different countries)
- french translation
- update of the VIES link to check the validity of the number (only for a compatibility with php 5.3)
- THIS FUNCTION INTRODUCED IN THE PREVIOUS MOD DOES NOT WORK ANYMORE: "Don't add tax on any prices in the store if customer is logged in with verified VAT-number and customers shipping address is not in the same country as the store." So, the file catalog/includes/functions/functions_taxes.php is not updated. Please, use the geniune file from 1.3.9e instead.
Download the file here: http://dl.free.fr/bdI0KVTFH (Zip file, 119 KB) :beta:
And also i installed an earlier version so how do i remove the old sql
INSERT INTO configuration_group VALUES (27, "VAT-Mod", "VAT-Mod options", 27, 1);
INSERT INTO configuration VALUES ("", "Check the European Tax number", "ENTRY_TVA_INTRACOM_CHECK", "true", "Check the Customer's European Tax number by the europa.eu.int server", 27, 1, "", "", NULL, "zen_cfg_select_option(array('true', 'false'),");
INSERT INTO configuration VALUES ("", "European Tax number of the store", "TVA_SHOP_INTRACOM", "", "European Tax number:", 27, 22, "", "", NULL, NULL);
INSERT INTO configuration VALUES ("", "Minimum characters for European Tax number", "ENTRY_TVA_INTRACOM_MIN_LENGTH", 10, "Required characters for European Tax number (0 if you don't want checking)", 27, 17, "", "", NULL, NULL);
ALTER TABLE address_book ADD entry_tva_intracom VARCHAR(32) DEFAULT NULL AFTER entry_company;
ALTER TABLE orders ADD billing_tva_intracom VARCHAR(32) AFTER billing_company;
and ad the new
Your problem is a very simple configuration problem. Go to the Zen Cart Admin, menu Configuration -> VAT-MOD and change the number in front of "Minimum characters for European Tax number". Put 0 for not check, or something to 4 (the minimum for Romania). If this does not help, I have no other clue.
VAT-Mod BETA UNOFFICIAL for Zen Cart v. 1.3.9f
For Companies inside European Union
===========================
Remake and compatibility with Zen Cart v. 1.3.9f
Special edition done by dimjoula.
IMPORTANT NOTE: this is not the official release from Beez & Vike.
It is a *BETA* version. I did a copy and paste from the previous codes (VAT-Mod 1.3.0 for Zen Cart v. 1.3.8a) and paste them to Zen Cart v. 1.3.9f files. It works for me with my own personal configuration, but you should take it with care. IT MAY NOT WORK WITH YOUR OWN CONFIGURATION out of the box. Perhaps you will need to edit some files. If it is the case, please share it here.
BACKUP - BACKUP first your files and database before updating your store with these files. It may be buggy. You must know how to restore it!!!
What's new:
- PARTIAL (90%) Compatibility with Zen Cart v. 1.3.9f (but should be OK in most regular situations; potential problem when the customer uses several different addresses located in different countries)
- french translation
- update of the VIES link to check the validity of the number (only for a compatibility with php 5.3)
- THIS FUNCTION INTRODUCED IN THE PREVIOUS MOD DOES NOT WORK ANYMORE: "Don't add tax on any prices in the store if customer is logged in with verified VAT-number and customers shipping address is not in the same country as the store." So, the file catalog/includes/functions/functions_taxes.php is not updated. Please, use the geniune file from 1.3.9f instead.
Download the file here: http://dl.free.fr/ihFjqxh49 (Zip file, 151 KB) :beta:
When a user clicks on my account link there is no option to add the vat number or change company name if they did not enter it upon registration......This would be helpful
It is there actually - just under edit address - not where I was expecting.
"So, the file catalog/includes/functions/functions_taxes.php is not updated. Please, use the geniune file from 1.3.9f instead"
-That is important - blank screen otherwise as i just found out
For your information, the "VAT-Mod BETA UNOFFICIAL for Zen Cart v. 1.3.9f" module is fully compatible with 1.3.9h.
I'm using 1.3.8.a it is a Dutch shop selling licenses.
The text on the order should be changed according to if it's a company and the country:
Country Customer On Order
Netherlands Company 19 % VAT
Netherlands No Company 19 % VAT
EU not NL Company VAT Reversed Charge
EU not NL No Company VAT Reversed Charge
Outside EU Company empty
Outside EU No Company empty
How can I accomplish this?
Hi,
I have the 1.3.9 version, and I executed the sql patch, and upload the files, but now I cannot enter in the admin (blank site).
Do you know any reason why could that happend how could I fix it?
Thanks!
edit: Oops, I saw the answer infocom gave one page earlier. There was a problem with the old functions_vatmod.php, but it is fixed in the new version ;-)
Hi to all, I'm trying to install this mode, but I have this problem updating the database. This is the error:
What should I do? HELP!!! :frusty:Code:1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO configuration VALUES ("", "Check the VAT number", "ENTRY_TVA_INTRACO' at line 3
in:
[INSERT INTO configuration_group VALUES (27, "VAT-Mod", "VAT-Mod options", 27, 1); INSERT INTO configuration VALUES ("", "Check the VAT number", "ENTRY_TVA_INTRACOM_CHECK", "true", "Check the Customer's VAT number by the europa.eu.int server", 27, 1, "", "", NULL, "zen_cfg_select_option(array('true', 'false'),"); INSERT INTO configuration VALUES ("", "VAT number of the store", "TVA_SHOP_INTRACOM", "", "Intracom VAT number:", 27, 22, "", "", NULL, NULL); INSERT INTO configuration VALUES ("", "Minimum characters for VAT number", "ENTRY_TVA_INTRACOM_MIN_LENGTH", 10, "Required characters for VAT number (0 if you don't want checking)", 27, 17, "", "", NULL, NULL); ALTER TABLE address_book ADD entry_tva_intracom VARCHAR(32) DEFAULT NULL AFTER entry_company; ALTER TABLE orders ADD billing_tva_intracom VARCHAR(32) AFTER billing_company;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Still not working
"Server is unable to check your VAT number: please, leave blank"
maybe i should disable it for now
i'm using 1.3.8a with 1.30
i'm getting tired of this, some say it work but not for me and i have installed it as i should. It can't take this long to fix, if not i have to pay someone to fix it...
Can anyone fix this or?
I even tried to install and fix it and the shoping cart stoped working lol
If not i have to use the shop without it, it's not rocket science
I'm not a coder, but i'm sure it would be an easy fix for someone who can code.
Just for your information, the beta version I released here is only compatible with Zen Cart 1.3.9, it is not compatible with 1.3.8a.
@ oberheimer: it is possible that your web server (say, your provider) refuse to connect to an external server (from a server to another server), thus blocking the connection to the VAT Number website. If this is the case, there is nothing to fix.
Hi dimjoula,
Firstly many thanks for taking the trouble to release the update.
I wanted to check something in /admin/invoice.php around lines 236
The stock version from 1.3.9h is as follows:
Your version is as follows:PHP Code:
<?php if (ORDER_COMMENTS_INVOICE > 0) { ?>
<tr>
<td class="main"><table border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="smallText" align="center"><strong><?php echo TABLE_HEADING_DATE_ADDED; ?></strong></td>
<td class="smallText" align="center"><strong><?php echo TABLE_HEADING_STATUS; ?></strong></td>
<td class="smallText" align="center"><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td>
</tr>
<?php
$orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments
from " . TABLE_ORDERS_STATUS_HISTORY . "
where orders_id = '" . zen_db_input($oID) . "' and customer_notified >= 0
order by date_added");
if ($orders_history->RecordCount() > 0) {
$count_comments=0;
while (!$orders_history->EOF) {
$count_comments++;
echo ' <tr>' . "\n" .
' <td class="smallText" align="center" valign="top">' . zen_datetime_short($orders_history->fields['date_added']) . '</td>' . "\n";
echo ' <td class="smallText" valign="top">' . $orders_status_array[$orders_history->fields['orders_status_id']] . '</td>' . "\n";
echo ' <td class="smallText" valign="top">' . ($orders_history->fields['comments'] == '' ? TEXT_NONE : nl2br(zen_db_output($orders_history->fields['comments']))) . ' </td>' . "\n" .
' </tr>' . "\n";
$orders_history->MoveNext();
Most of these differences however seem to be as a result of changes made by the Zen Team between V1.3.8a and V1.3.9h. What I couldn't work out is whether the VAT Mod needs the old code or if I can drop itPHP Code:
<?php if (ORDER_COMMENTS_INVOICE > 0) { ?>
<tr>
<td class="main"><table border="1" cellspacing="0" cellpadding="5">
<tr>
<td class="smallText" align="center"><strong><?php echo TABLE_HEADING_DATE_ADDED; ?></strong></td>
<td class="smallText" align="center"><strong><?php echo TABLE_HEADING_CUSTOMER_NOTIFIED; ?></strong></td>
<td class="smallText" align="center"><strong><?php echo TABLE_HEADING_STATUS; ?></strong></td>
<td class="smallText" align="center"><strong><?php echo TABLE_HEADING_COMMENTS; ?></strong></td>
</tr>
<?php
$orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments
from " . TABLE_ORDERS_STATUS_HISTORY . "
where orders_id = '" . zen_db_input($oID) . "'
order by date_added");
if ($orders_history->RecordCount() > 0) {
$count_comments=0;
while (!$orders_history->EOF) {
$count_comments++;
echo ' <tr>' . "\n" .
' <td class="smallText" align="center">' . zen_datetime_short($orders_history->fields['date_added']) . '</td>' . "\n" .
' <td class="smallText" align="center">';
if ($orders_history->fields['customer_notified'] == '1') {
echo zen_image(DIR_WS_ICONS . 'tick.gif', ICON_TICK) . "</td>\n";
} else {
echo zen_image(DIR_WS_ICONS . 'cross.gif', ICON_CROSS) . "</td>\n";
}
echo ' <td class="smallText">' . $orders_status_array[$orders_history->fields['orders_status_id']] . '</td>' . "\n";
echo ' <td class="smallText">' . ($orders_history->fields['comments'] == '' ? TEXT_NONE : nl2br(zen_db_output($orders_history->fields['comments']))) . ' </td>' . "\n" .
' </tr>' . "\n";
$orders_history->MoveNext();
Kind regards,
Brent
Ok if you can install it so it works (copy everything to the new files)
i can send $$ your way (paypal). I'm just checking with my host first about connecting to a different server
I just need this to work so i can open my shop
Hmm i set the vat check to false now so i can check it manually but i still have a blank screen in the cart index.php?main_page=checkout_payment
if i can fix this i'm set for now
@ Brent: thank you. You are right, I used an older file. The only difference is the deletion of the icon column. So I have changed the archive.
@ oberheimer: this bug looks like a bad copy and paste of a mod to a genuine zen cart file. Try to find what you have modified in the checkout files and redo it carefully. It is a classical mistake. You should try to find better advice on this matter in other sections of this forum.
VAT-Mod BETA UNOFFICIAL for Zen Cart v. 1.3.9h
For Companies inside European Union
===========================
Remake and compatibility with Zen Cart v. 1.3.9h
Special edition done by dimjoula.
IMPORTANT NOTE: this is not the official release from Beez & Vike.
It is a *BETA* version. I did a copy and paste from the previous codes (VAT-Mod 1.3.0 for Zen Cart v. 1.3.8a) and paste them to Zen Cart v. 1.3.9h files. It works for me with my own personal configuration, but you should take it with care. IT MAY NOT WORK WITH YOUR OWN CONFIGURATION out of the box. Perhaps you will need to edit some files. If it is the case, please share it here.
BACKUP - BACKUP first your files and database before updating your store with these files. It may be buggy. You must know how to restore it!!!
What's new:
- PARTIAL (90%) Compatibility with Zen Cart v. 1.3.9h (but should be OK in most regular situations; potential problem when the customer uses several different addresses located in different countries)
- french translation
- update of the VIES link to check the validity of the number (only for a compatibility with php 5.3)
- THIS FUNCTION INTRODUCED IN THE PREVIOUS MOD DOES NOT WORK ANYMORE: "Don't add tax on any prices in the store if customer is logged in with verified VAT-number and customers shipping address is not in the same country as the store." So, the file catalog/includes/functions/functions_taxes.php is not updated. Please, use the geniune file from 1.3.9h instead.
Download the file here: http://dl.free.fr/gvQSY8YGb (Zip file, 151 KB) :beta:
Now it works :D
thanks alot dimjoula for info
Now i just need to fix the store country, they charge me 25% even for the company but i think someone fixed it here so need to check thanks alot i'm so happy atm :smile:
i can not get the download of the new version :(
@dimjoula
Thanks for you update of the vat mod. One question though. could you try and make it compatible with super orders? What I mean is already make the changes in the files super_invoice.php, and super_packingslip.php.
I'm having this exact problem as customers outside the UK but within the EU are not being charged VAT when they pay via paypal express. Please let me know exactly what the entry_tva_intracom fields in the database should be set to? Should i be unticking the Null box and in the default field setting it to 'None' and putting two exclamation marks ' ' like this underneath?:dontgetit
I'm making changes through phpmyadmin and I'm not familiar with the code or commands. The fields are currently as follows:
http://www.zen-cart.com/forum/newatt...anageattach&p=
Can you edit this image so I can see exactly what changes to make?