Re: VAT-mod for European companies
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;)
Re: VAT-mod for European companies
Quote:
Originally Posted by
bobanct
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
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;
}
This error shows up when trying to enter the admin section of the store.
Andrew
Re: VAT-mod for European companies
Fixed the above with this post. :smile:
Quote:
Originally Posted by
a1m.Overlord
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;
}
?>
If I'm wrong and the array is broken with intend, please tell me ;)
MfG
Re: VAT-mod for European companies
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
Re: VAT-mod for European companies
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
Re: VAT-mod for European companies
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
Re: VAT-mod for European companies
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
Re: VAT-mod for European companies
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
Re: VAT-mod for European companies
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
Re: VAT-mod for European companies
Quote:
Originally Posted by
robsnowden
I am sure someone clever like Kim or whoever can sort this out quickly for you.
As Kim will be tucked up in bed at the moment, I'm afraid you'll have to settle for whoever :wink:
Quote:
Originally Posted by
plandon
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);]"
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 better
Quote:
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);