Try "As defined" and make sure the textbox below is empty (also no spaces etc.)
This is for new accounts, but you also have to update the existing ones, do you know how?
Printable View
Actually, on second thoughts i will need help on the existing customer accounts. Do i just change the settings within the address book, and if so, to what? Also, am i supposed to uncheck the null box as shown in the previous attached image? And just to be sure, this fix will enable VAT to be added to EU customers outside the UK when paying via Paypal Express?:unsure:
After fixing this, everything should work as expected.
The setting you already made ensures that for new customers, the field will be filled with an empty string instead of NULL, which was wrong and is not understood by the shop software.
Now you have to change all those existing records which have NULL in this field. You can either do it manually, record by record (not sure if there is some kind of bach mode), but I suggest you to do this simply by entering SQL code:
Make sure you have the correct table name (maybe in your database, it is not "adress_book" but "zen_address_book" or something similar, look this up before and change the sql statement accordingly.PHP Code:
update address_book set entry_tva_intracom = '' where entry_tva_intracom is null
I haven't tested it, but I guess it should work. To be on the safe side, make a backup of your database before!!
Bernhard
Hi,
I am running zencart 1.39h and have applied the 1.39h VAT mod for european companies. In previous installations this worked perfectly.
For some reason I am now finding that taxes for purchases in the Store country (UK) calculate VAT correctly (UK VAT appears on the invoice), but purchases for European Companies without a VAT number have no VAT added. It seems as if the EU VAT zone is not being applied.
Any clues as to where to start debugging? entry_tva_intracom has been set to ''. I have the priorities of the Tax Rates set as 1 EU, 2 UK. Both rates use the "Taxable Goods" tax class. Our products are all electronic delivery, so set to free shipping.
Thanks. FEQ
VAT-Mod BETA UNOFFICIAL VERSION 2 for Zen Cart v. 1.3.9h
For Companies inside European Union
===========================
It is a version 2 patch for Zen Cart v. 1.3.9h.
I have edited 3 small bugs from my previous patch, and especially the one with the NULL entry in the address_book SQL database (see the last two pages on this thread for a solution). Hope it works.
===========================
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:
- 3 small bugs have been edited compared to the previous release of this unofficial patch
- 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/tQn26jxyb (Zip file, 150 KB) :beta:
It seams that this module doesn't work anymore because the VIES EU site has suffered some modification and verification patch from the module must be updated to point to the new address.
Now I'm getting this error when creating a new account: "Server is unable to check your European Tax number: please, leave blank"
I'm using Zencart 1.38a and module worked fine until EU VIES site updated their page.
Can someone with some experience update this module? (I'm don't have coding knowledge).
Thank you!
Zencart (1.39h) noob here.
Problems I encounter installing Vat-mod for 1.39h beta beta,
I had interference with
* stock by attributes 1-4-13
* captcha antirobot registration 1-3
I also got a blank page on my admin side
I did a merge between
\admin\orders.php
modified by sba and vat-mod, i used winmerge to do that merge... great tool that winmerge thing..
I did the same thing with
\includes\modules\create_account.php modified by captcha
\admin\includes\functions\general.php modified by sba
Blank screen on admin
http://www.zen-cart.com/forum/showth...35911&page=112
I took out zen_draw_admin_box function
in
\admin\includes\functions\general.php
and that fixed the admin blank
Now captcha was working but did not appears.. so no signups
basically captcha modifies
\includes\templates\template_default\templates\tpl_modules_create_account.php
but this file is overriden by
\includes\templates\temperso1\templates\tpl_modules_create_account.php created by VAT-Mod
once you find this out, you can merge the 2 files in
\includes\templates\temperso1\templates\tpl_modules_create_account.php
... finally I could go for taxes configuration...
My company is registered in France so I used
GB 879456458 to check it... working great...
*** To follow up on all the file changes.... ***
I used a little trick in the MS-Dos prompt,
dir /s /b>filelist.txt
this create a text files with all files, folders and subs..
I did this for all the files of every addon i used... watch out for your new admin folder name and YOUR_TEMPLATE folder name...
Note: before installing the addon, make a back up for once, but also a small back up of only the files that are modified by that add on... that will save you time to reload the previous version...
Then I put all those strings in excel, make 2 pivot table, one on the file complete path+name string, one on the filename alone... for the overriding thing.
and look for files modified more than once...
I suggest this to be done as soon as adding modules to ZC...
NOW my question... is there a soft that can keep trace of all changes, modified files etc... instead of me doing a excel and pivot? something that could back up only modified files...
That would be so helpful.
Thanks for the great addon VAT-mod and the Beta version on the post for 1.39h!
If you are sure that the add-on is compatible with the last Zen-Cart version, blank pages are often (almost always) caused by a bad copy and paste of the code.
You have to find in which file you introduced this little bug.
Sorry for not being more helpful.
Hi all,
Has there been any update on getting this module working for 1.3.9h ?
It was working fine for 1.3.8 - but seems not to work any more.
An update would be most appreciated
Thanks
Works fine in 1.3.9h here Jamie...
Thanks eentje,
We have been using the Beta for 139 but applied a number of fixes, mainly down to the clients needs (heavily modified site).
When we get a chance we'll feed back.
Take Care
Is anyone using this mod on zen cart 1..5.0?
The 1.3.9 beta is still buggy... although it works... eventually...
1.5.0 is still lightyears away... (afaik)
Thanks eentje
I wonder what people are doing who need it in zen 1.5.0?
Hi All,
Are there any secrets to using the VAT mod in 1.39? I have it working PROVIDED the user has entered their VAT number. For some reason it seems to ignore the module if there is no VAT number against the client (v. annoying).
I have to say that this is essential for my shop, so if 1.5 is not supporting this, I am going to have to look for another cart. Any ideas or suggestions? Zencart has done an excellent job so far, but the VAT module keeps the tax men at bay, and with out it I have been caught out of pocket a few times.
Thank you
I'd very interested to know if anyone has looked to see how much work is involved in using VAT-mod in 1.5.0. Will it just be a case of diffing and cut n pasting, or is 1.5.0 too radically different?
I have cut 'n' pasted dimjoula's update for 1.3.9h (see here: http://www.zen-cart.com/forum/showth...=35744&page=31 ) into a fresh Zencart 1.5.0. Everything worked the same as 1.3.9h for me. I only have on mod installed (Ceon's Excellent Back In Stock notifications), and a template that just adds cosmetic changes. I have also tested this on a completely fresh 1.5.0 install with no changes (including DB), and it worked the same as 1.3.9h. Of course, other Zencart's may differ. I have updated the SQL install file so that it handles the new PCI compliance DB registration for modules.
Here is the link if anyone want to download and test:
http://www.wilorc.co.uk
** PLEASE REMEMBER: This is an unofficial release. It comes with no guarantees. Remember to back up your data and files. **
Thanks wilorc! I'll be trying this out on a test cart. Will post back how it goes. I'm busy with a number of other projects so I may not post back for a week or so.
Couldn't wait so I found a small slot of time to try this out. The only problem I found (so far) is the admin/customers.php file was missing and was keeping the vat from showing in customer address info in admin. I used that file from a different package and that fixed the problem.
Thanks buildingblocks for testing and spotting the missing admin/customers.php file. I have just released an updated version of this **unofficial** module. It's got the missing admin/customers.phpfile with merged changes from dimjoula'sprevious module, plus I have also modified includes/functions/functions_taxes.php so that VAT exempt EU customers do not see prices with VAT when they are logged into their accounts. VAT is also not displayed on the shipping page for VAT exempt EU customers.
You can download it here: http://www.wilorc.co.uk
I have made a small, but important, change to:
/includes/functions/functions_taxes.php
On line 55 I've changed:
To be:Code:if ($entry_tva_intracom != "" and $zone_id != STORE_ZONE) {
This change will ensure that a VAT registered customer who is registered in the same country as the store does not get zero-rated prices.Code:if ($entry_tva_intracom != "" and $country_id != STORE_COUNTRY) {
I've discovered that at least one country can no longer be checked with this VAT number checking module. The country is Spain, and there may be others. So I have verified that United Kingdom, Sweden, France, Netherlands, Germany, Belgium, Ireland, Bulgaria and Finland are working. The reason why some countries cannot be checked is because it is using an out-dated method of connecting to VIES. It is using a php function called file_get_contents(). Basically, it is just doing a glorified wget on the VIES website. The correct method to use is WSDL SOAP Interface. I'm going to start work on changing this mod to use the SOAP interface, and it should be available soon.
I've converted VAT Mod running on my site to use the WSDL SOAP Interface. I've tested and am now running live. All is working normally, and all EU country VAT numbers are being checked correctly. One proviso is that it requires the PHP soap extension to be installed and configured correctly (php.ini), otherwise it will completely break everything, i.e., zencart total screen white-out. For that reason I'm not going to add the new code to the download, but I'm happy to pass it on to anyone who wants it and understands about installing and configuring PHP extension modules.
Unfortunately the links to both the 1.3.9 and 1.5 version seem to be no longer available. Would anyone be able to post working links please? Many thanks.
I would like to be a third person requesting a new updated link to the 1.3.9 beta version that purportedly works in 1.5 too. Thanks!
Wilroc - Just noticed your post numbered 327. I would greatly appreciate the mod utilizing SOAP to be able to query all countries. Also any other changes you made to the original Dimjoula beta version.
Thanks!
yeah, would def be good to get a copy of this modified version that should work on zen 1.5
The 1.5 version is now available at http://www.wilorc.co.uk. The download does NOT work for all Countries as outlined on earlier posts in this forum. However here is the code for the "zen_verif_tva" function in includes/functions/extra_functions/functions_vatmod.php:
function zen_verif_tva($num_tva){
$num_tva=preg_replace('/ +/', "", $num_tva);
$prefix = substr($num_tva, 0, 2);
if (array_search($prefix, zen_get_tva_intracom_array() ) === false) {
return 'false';
}
$tva = substr($num_tva, 2);
$client = new SoapClient("http://ec.europa.eu/taxation_customs...atService.wsdl");
if($client){
$params = array('countryCode' => $prefix, 'vatNumber' => $tva);
$r = $client->checkVat($params);
if($r->valid == true){
return 'true';
} else {
return 'false';
}
} else {
return 'no_verif';
}
}
PLEASE NOTE THE FOLLOWING: One proviso is that it requires the PHP soap extension to be installed and configured correctly (php.ini), otherwise it will completely break everything, i.e., zencart total screen white-out. For that reason I'm not going to add the new code to the download, but I'm happy to pass it on to anyone who wants it and understands about installing and configuring PHP extension modules. "
Is anyone able to make the changes to the necessary files and then post them back for everyone to use with necessary instructions?
I must stress this is NOT my work, other than chasing up the re-connection of the original download.
This could be very useful for many zen-cart european store owners / developers.
hi wdkstudio
I have a fresh install of zen v5 with this module installed on wampserver, php 5.3.8, can see 'vat' under 'configruation', i also have SOAP enabled, see attached. I replaced the zen_verif_tva code with code above (is this correct or does the above code go alongside existing zen_verif_tva code, not replace it??).
However, I am still getting the 'zencart total screen white-out', as you mentioned i might.
As far as I can see i have done everything correct, have you any idea of where i might be going wrong?
Advice appreciated.
Matt
Hi Matt
I really just got the download re-enabled. However, if you go to http://www.webhostinghub.com/support.../blank-website you might find an answer to your Whiteout problem
Good luck
wdkstudio
hi wdkstudio
you did say 'One proviso is that it requires the PHP soap extension to be installed and configured correctly (php.ini), otherwise it will completely break everything, i.e., zencart total screen white-out.', and this is what I am experiencing, was just wandering if you could advise how i properly configure soap extension, as, from what you have said above, this is the issue. If the white screen of death is not because of soap, but because code i entered is wrong, it is a php issue.
Referring to my post above, do i just replace the zen_verif_tva code in includes/functions/extra_functions/functions_vatmod.php with the code above? a direct paste over, yes?
matt
Hi Matt
all I did was get the original download link re-enabled. I am working on a site where the VAT mod is required, but have not yet implemented this myself. I had hoped that there might be other people who wanted to use this mod that had more experience of using SOAP that might have come in with some imput.
You do have to replace the zen_verif_tva code in includes/functions/extra_functions/functions_vatmod.php with the code above. Yes, a direct paste over.
Sorry not to be more help.
wdkstudio
Anyhow, you do have to replace
ok, cool, thanks for sorting link
i have no experience with SOAP, but, am also working on a zen v1.5 which will need eu vat mod, so, will report back with progress...
It works like heaven, only one thing: The TAX-number is not saved in the database. :(
Anyone has an idea where to start? I really have no idea where ZC gives the command to save in the database.
If I add the number in the back-end, everything works wonderfully. No tax is being calculated if there is a EU tax number active. :)
But my customers can't add their tax-number in the back-end..
Doh, modules/create_account.php was overwritten by modules/MY_TEMPLATE/create_account.php
Hello Everyone!
I have been fighting with this the entire day, read all posts in this thread and nothing helped!
Our website is wholesale inside EU from NL.
My BIG problem is that if a customer is registering without VAT number the order total is without VAT.
I fixed it in the database so not NULL in the address book but still nothing.
Only customers inside NL get VAT calculated on their order, I want that customers without VAT number will get VAT charged on their orders as well.
PLEASE PLEASE PLEASE if someone solved this either post here or pm me with some help...
Thank you in advance
Hello Evinu,
i have olso some problems, i want to ask what version of zencart you use? i use 1.3.9h and have inported the latest 1.3.8 version off that
BTW stuff. maby you can help me out with your orginal files you have?
My formaly problem is that if people register the VAT and KVK numbers are not saved into the ADDRESS_BOOK
if you edit after register, then you can save the VAT number. olso in ADMIN you just can update the VAT and KVK.
Please advise?? somebody a zip with the good version for 1.3.9h
Greets,
Mark
PS - ik ben nerderlander, mss praat dat makkelijker :P
If anyone is still maintaining or updating any version of this, then perhaps they could include this fix.
I use table prefixes, and part of the code in /includes/functions/functions_taxes.php is not compatible, this is what you need to do to fix it.
Before: @line ~49
$customers_default_address_id = $customer_check->fields['customers_default_address_id'];
$address_book_check = $db->Execute("select * from address_book where address_book_id = $customers_default_address_id and customers_id = $customers_id");
$entry_tva_intracom = $address_book_check->fields['entry_tva_intracom'];
After:
$customers_default_address_id = $customer_check->fields['customers_default_address_id'];
$address_book_check = $db->Execute("select * from ".TABLE_ADDRESS_BOOK." where address_book_id = $customers_default_address_id and customers_id = $customers_id");
$entry_tva_intracom = $address_book_check->fields['entry_tva_intracom'];
Notice I have just added the define reference to TABLE_ADDRESS_BOOK.
Another problem I have had was with the install SQL statements, I am not sure why but they don't seem to be able to do the SELECT from the configuration group table in order to get the configuration_group_id. I just modified the statements to manually put the configuration group id in.
I am installing on Zen cart 1.5.1 and apart from these problems it seems to work fine so far - but I have not yet gotten to testing it fully.
Also - eavinu, did you try the fix in post number #238 : http://www.zen-cart.com/showthread.p...531#post774531
I am using zencart v1.3.9g. Can anyone tell whether the Vat mod for European Countires is compatible with this version or if not is there a mod that is compatible?
I have read this whole thread but can find no mention of 1.3.9g - may have missed it though as it's a rather long thread!
Any help/advice would be greatly appreciated!
SPJS - i use it on v1.3.9h but am sure i also used it on your version. i think i had to have it tweaked to work though, not sure of the exact details, i would just set up a test/dev site using same files and database (but a copy) as current, live site, and then test, see what/if any errors occur then post them here if they do...
where is the developer/maintainer for this mod and forum, he/she never participates, i have tried to contact before, but no luck, is quite clear a lot of people need help, and, am guessing they wouldn't mind paying for help either, i wouldn't, as i've said before on this forum, it such an important module for a few of my clients, what happened here!?
Thanks Mattys much appreciated, I'll give it a go and see what happens......!
Hi all,
Do you know if there is an update or similar mod for 1.51?
Thanks
Customer Tax Exempt for v1.5.5:
https://www.zen-cart.com/downloads.php?do=file&id=405
I've been asked by another Zenner to update this plugin for use on Zen Cart 1.5.5 and later, making modifications to reduce the number of core-files that require changes.
From my initial inspection of the current codebase, it looks like a fair rewrite (8-10 hours of development) to use the Zen Cart notification interfaces to allow the processing to be more "drop-in". If anyone is interested in partially funding the development, I'll be creating an initially-private GitHub repository where you can participate in the module's creation and ensure that any store-specific requirements that you might have are addressed during the plugin's re-launch.
PM me if you're interested.
Possibly I do not understand what this mod does :blush:
I have a VAT registered company in Switzerland. I use the built in tax functions in 1.5.5d and they calculate the VAT correctly, show amounts with and without VAT on the invoice plus a VAT total and do not charge VAT outside of my country.
So what more does this plugin do?
The VAT Mod currently adds processing to gather as input the customer's VAT Number for B2B transactions, displaying that information on the orders, invoices and packingslips ... and, more importantly, enables that B2B customer to automatically receive a VAT refund.
In its updated version, the plugin will also contact the VIES web-service to validate that the VAT number entered is valid and make modifications to fewer built-in/core Zen Cart modules.
Thanks for the info; if any "alternate" VAT-validation services become available, the updated version of this plugin could be modified to provide a country-by-country lookup.
Hello.
I'am using zen cart v1.5.7ppatch1
With this module from what understand you can make also remission of tax if you have to make export the products to third countries
and it is logical but.. to make remission must send first to customs of the origin country in my case Greece and they charge me around 40,00 euros (UPS CUSTOMS SERVICE).My question is how can I charge the customer from the third country to pay this fees when his country it is out of EU ?
You do that with your shipping module.