deech123 Posted June 2, 2010 Share Posted June 2, 2010 Hi guys,is there any way when a client make a new account that there is an extra field?because if a company in EU buys something on the shop they must be able to add a TVA or BTW number.This is obligatoire in EU and also this must be printed on the invoices.This field is not required but must be there in order to use it.Any Idea how to make this work, because for the EU law the shop is now not possible to use because the TVA/BTW number must be located on the invoice.hope someone has a solution for this one.thx Link to comment Share on other sites More sharing options...
rocky Posted June 3, 2010 Share Posted June 3, 2010 PrestaShop v1.3 has the option to add a "tax identification number" for countries that require it. Just go to Shipping > Countries, edit a country and change "Need tax identification number?" to "Yes". This will add a text field to the account creation field when that country is selected where the customer can enter their tax identification number. Unfortunately, PrestaShop will only allow Spanish tax numbers to be entered at the moment. See my post here for how to remove the number verification, so that you can enter anything in the field. Link to comment Share on other sites More sharing options...
deech123 Posted June 3, 2010 Author Share Posted June 3, 2010 rocky that I found allready out, but like you told I have two problems.The removing of the verfication is no problem.but the moment I set the need tax identification to yes ...all customers need to have one.and since I work with normal clients and companies, the tax number can not be required, but must be presetn all the time :-)get it? :-)and strange no one in Europe ever mentioned this, this is required by law.any tip to remove the required tax field and just make it there all the time?thx m8 for your wonderfull help ;-) Link to comment Share on other sites More sharing options...
rocky Posted June 3, 2010 Share Posted June 3, 2010 You could tick "Needs tax identification number?" on every country to make it always available and try commenting out the following code on lines 58-68 in authentication.php to ignore empty tax identification numbers: elseif (Tools::getValue('dni') != NULL AND $validateDni != 1) { $error = array( 0 => Tools::displayError('DNI isn\'t valid'), -1 => Tools::displayError('this DNI has been already used'), -2 => Tools::displayError('NIF isn\'t valid'), -3 => Tools::displayError('CIF isn\'t valid'), -4 => Tools::displayError('NIE isn\'t valid') ); $errors[] = $error[$validateDni]; } Link to comment Share on other sites More sharing options...
deech123 Posted June 3, 2010 Author Share Posted June 3, 2010 Hi rockyworks like a charm.therefore a hugh thank you :-) hahahahps, maybe you know this (yep, third question) :-)will updating csv categories I found out that the unique element is not the ID but the name.example :ID ************** Name *************** Parent category12 Audio 113 Video 114 Hdmi cable 1215 Hdmi cable 13normaly I must have :Audio Hdmi cableVideo Hdmi cablebut what I get is totaly different.is there any way to change the import of category that it looks to the ID as unique key?thx m8 Link to comment Share on other sites More sharing options...
rocky Posted June 3, 2010 Share Posted June 3, 2010 I just noticed that you also need to comment out the following on lines 42-43 of identity.php so that changing your tax identification number does not cause an error: elseif ($need_identification_number AND Tools::getValue('dni') != NULL AND !Validate::isDni(Tools::getValue('dni'))) $errors[] = Tools::displayError('identification number is incorrect or already used'); I thought that the category ID was the unique key. It is possible to specify the parent category and categories of a product using names, but I think it is better to specify category IDs instead. I'm not sure how to help you with your issue. All I can say is that it is the following code near the end of the categoryImport() function in admin/tabs/AdminImport.php that checks whether a category with the same name exists and gets its ID instead of creating another category with the same name: $categoryAlreadyCreated = Category::searchByName($defaultLanguageId, $category->name[$defaultLanguageId], true); // If category already in base, get id category back if ($categoryAlreadyCreated['id_category']) { $catMoved[$category->id] = intval($categoryAlreadyCreated['id_category']); $category->id = intval($categoryAlreadyCreated['id_category']); } Link to comment Share on other sites More sharing options...
deech123 Posted June 4, 2010 Author Share Posted June 4, 2010 Hi Rocky,the tip of changing the identity.php was not necessary :-)I just did the test, so logged on, then went to change my data,and there I just changed the tva number. I got no error and it was changed :-)strange hey :-) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now