VirtueMart 1.1.x [ Old version - no longer supported ] > Customer / User Management VM 1.1
EUVATID field and Shopper group
(1/1)
csaffi:
Hi everybody,
I've got a problem with the euvatid field and the shopper group on which the customer is moved upon registration. I tried in different ways, but the customer group is always "default", even if the webservice URL for EU VAT ID validation should be correct: "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl".
I see that this problem was discussed many times in past, but I still have it using Virtuemart 1.1.9.
It should be a problem for many people... I hope you can help me!
Thank you very much in advance
DaveVormbuilders:
At last, I've got an answer.
It's not big and it's not clever, but it works.
You need to remove the SOAP call to the EU servers. Your VAT number will still be checked by a javascript function (\components\com_virtuemart\js\euvatcheck.js), so that will get the biggest errors out of it, but it's not watertight.
Here's what you do. Open administrator\components\com_virtuemart\classes\ps _shopper.php
Look for this code:
--- Code: --- // Check the VAT ID against the validation server of the European Union
$d['isValidVATID'] = vmValidateEUVat( $d[$field->name] );
if( !$d['isValidVATID'] ) {
//TODO: Roland - insert your error message here
}
if( !$d['isValidVATID'] && $field->required == 1) {
$provided_required = false;
$missing .= $field->name . ",";
}
$d['__euvatid_field'] = $field;
--- End code ---
Replace it with this:
--- Code: --- // Check the VAT ID against the validation server of the European Union
$d['isValidVATID'] = true;
$d['__euvatid_field'] = $field;
--- End code ---
This works for me - the JS check gets some errors out, and once through that, my user gets put into the correct group.
Usual caveats apply - backup the ps_shopper.php first, document your changes, and you should probably also tell the shop owner that the VAT number check isn't watertight.
I hope this helps someone, I know it was bugging me for ages.
Dave
jeroenvdw:
Thanks! This did the trick for me.
Cheers,
Jeroen
dchristof:
Amazing! I've been searching for days how on earth I could accomplish that. A million thanks DaveVormbuilders !! :)
Navigation
[0] Message Index
Go to full version