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

VAT-mod for European companies

Views: 114,578

Results 281 to 300 of 362
20 Dec 2010, 1:19 AM
#281
libelle avatar

libelle

New Zenner

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

VAT-mod for European companies

Hi to all, I'm trying to install this mode, but I have this problem updating the database. This is the error:

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.

What should I do? HELP!!! :frusty:

20 Dec 2010, 10:02 AM
#282
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: VAT-mod for European companies

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...

3 Jan 2011, 3:41 PM
#283
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: VAT-mod for European companies

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.

3 Jan 2011, 7:43 PM
#284
dimjoula avatar

dimjoula

New Zenner

Join Date:
Feb 2008
Posts:
23
Plugin Contributions:
0

Re: VAT-mod for European companies

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.

3 Jan 2011, 10:35 PM
#285
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: VAT-mod for European companies

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:

<?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();

Your version is as follows:

<?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();

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 it

Kind regards,

Brent

4 Jan 2011, 9:47 AM
#286
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: VAT-mod for European companies

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

5 Jan 2011, 10:19 AM
#287
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: VAT-mod for European companies

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

5 Jan 2011, 9:37 PM
#288
dimjoula avatar

dimjoula

New Zenner

Join Date:
Feb 2008
Posts:
23
Plugin Contributions:
0

Re: VAT-mod for European companies

@ 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.

5 Jan 2011, 9:45 PM
#289
dimjoula avatar

dimjoula

New Zenner

Join Date:
Feb 2008
Posts:
23
Plugin Contributions:
0

Re: VAT-mod for European companies

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:

7 Jan 2011, 10:14 AM
#290
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: VAT-mod for European companies

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:

7 Jan 2011, 11:41 AM
#291
feng avatar

feng

New Zenner

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

Re: VAT-mod for European companies

i can not get the download of the new version :(

7 Jan 2011, 10:38 PM
#292
gregger avatar

gregger

New Zenner

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

Re: VAT-mod for European companies

Hi,

I tried applying this version to 1.3.9h but have a problem during checkout.

If I add a £10 item to the basket when I go through checkout the total is £20 (always double) for the item and £2 (always 10% of the total value for VAT).

Any ideas?

dimjoula:

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:

16 Jan 2011, 12:17 AM
#293
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: VAT-mod for European companies

dimjoula:

@ 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.
Pleasure. I can't read any code so I have unfortunately have no idea what is important and what is not.

I think you may need to check /admin/orders.php as I think you are still using the version from 1.3.8a

16 Jan 2011, 1:12 AM
#294
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: VAT-mod for European companies

Has anyone else noticed VAT calculation errors when using Group Discounts? This was originally discussed here.

If you do have you may want to check the following monologue. :smile:

Any advice on this happily received.

5 Mar 2011, 4:48 PM
#295
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: VAT-mod for European companies

@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.

22 Mar 2011, 9:49 PM
#296
globalmemory avatar

globalmemory

New Zenner

Join Date:
Sep 2008
Posts:
64
Plugin Contributions:
0

Re: VAT-mod for European companies

BStBln:

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

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

23 Mar 2011, 7:05 AM
#297
bstbln avatar

bstbln

New Zenner

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

Re: VAT-mod for European companies

globalmemory:

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

If I remember correctly, the problem was that the default was NULL but should be an empty string.

How familiar are you with databases? Do you know the difference between NULL and ''? And which database and database management software do you use?

23 Mar 2011, 2:25 PM
#298
globalmemory avatar

globalmemory

New Zenner

Join Date:
Sep 2008
Posts:
64
Plugin Contributions:
0

Re: VAT-mod for European companies

BStBln:

If I remember correctly, the problem was that the default was NULL but should be an empty string.

How familiar are you with databases? Do you know the difference between NULL and ''? And which database and database management software do you use?

I'm making changes through phpmyadmin and I'm not familiar with the code or commands. The fields are currently as follows:

Can you edit this image so I can see exactly what changes to make?

24 Mar 2011, 8:49 PM
#299
bstbln avatar

bstbln

New Zenner

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

Re: VAT-mod for European companies

globalmemory:

Can you edit this image so I can see exactly what changes to make?

Which other options do you have in this combo box labelled "Default" (which on your picture is filled with value NULL)?

24 Mar 2011, 9:49 PM
#300
globalmemory avatar

globalmemory

New Zenner

Join Date:
Sep 2008
Posts:
64
Plugin Contributions:
0

Re: VAT-mod for European companies

BStBln:

Which other options do you have in this combo box labelled "Default" (which on your picture is filled with value NULL)?

The options are None, Null, As Defined and Current Timestamp