d.raison Posted March 19, 2013 Share Posted March 19, 2013 Hi all, i would like to have the VAT number field to be required but ONLY in the user's company is set. I need this in the address section of prestashop. I think i need something like this if(isset($_POST['company']) && $_POST['company']!='') { if((isset($_POST['vat_number']) && $_POST['vat_number']=='') || !isset($_POST['vat_number'])) $this->errors[] = Tools::displayError('ALERT VAT IS REQUIRED'); } but i really don't know how to do it. Many thanks to all and have a nice day. Link to comment Share on other sites More sharing options...
d.raison Posted March 20, 2013 Author Share Posted March 20, 2013 Any help? Link to comment Share on other sites More sharing options...
d.raison Posted March 22, 2013 Author Share Posted March 22, 2013 bump Link to comment Share on other sites More sharing options...
d.raison Posted March 28, 2013 Author Share Posted March 28, 2013 bump Link to comment Share on other sites More sharing options...
Spad Posted July 17, 2013 Share Posted July 17, 2013 (edited) add in AddressController after // Check country DNI in line 158 /// CHECK piva EMANUELE HACK if ( isset($address->company)&& $address->company !="") { if((isset($_POST['vat_number']) && $_POST['vat_number']=='') || !isset($_POST['vat_number'])) $this->errors[] = Tools::displayError('Partita iva Richiesta'); } WORK FOR ME! TNKS!!!! Edited July 17, 2013 by glamnoise (see edit history) 1 Link to comment Share on other sites More sharing options...
reno123 Posted November 29, 2015 Share Posted November 29, 2015 Yes, it works fine ! But how to set the same in OPC mode ? there is Ajax process but I can't find in which file.... Maybe somebody just remeber ? 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