pixie1982 Posted July 24, 2013 Share Posted July 24, 2013 (edited) When configuring my customer login process and testing it by trying to register as a customer I am blocked with the following error messages: Create an account There are 3 errors address (2) is required. other is required. The identification number is incorrect or has already been used. 1. I don't know what the problem is with address 2 as it is not a required field. 2. Other is referring to the additional information box which is also not a required field. 3. I am assuming that the identification number is the required VAT number box that is at the bottom of the page, however I do not know how to switch this off. I have checked and do not have the B2B functionality enabled. Can anyone please help explain this and how to solve it? Edited July 24, 2013 by pixie1982 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 1) 2) 3) can you say something more what you changed? 3) you can change under the localization > countries tab you've got there list of all available countries, click on "edit" near the active country, scroll page down and you will see option to use VAT as not required field. let us know what you changed, put some light on the problem Link to comment Share on other sites More sharing options...
pixie1982 Posted July 24, 2013 Author Share Posted July 24, 2013 Hi Vekia, I don't know what the problem is. I haven't changed anything as far as I can see. All I know is that the two fields on the customer account creation page include the fields 'Address 2' and 'Additional Information' and both of these say they are not required (don't have an asterisk *). If there is nothing in the boxes then you cannot progress any further, getting the error message I posted above. If you put something in the boxes you can. I can't tell you anything more than that I'm afraid. Link to comment Share on other sites More sharing options...
pixie1982 Posted July 24, 2013 Author Share Posted July 24, 2013 Your suggestion worked for number 3 thanks, by the way. Link to comment Share on other sites More sharing options...
vekia Posted July 25, 2013 Share Posted July 25, 2013 go to the classes/Address.php you've got there object definition like this one: public static $definition = array( 'table' => 'address', 'primary' => 'id_address', 'fields' => array( 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId'), 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64), 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), 'vat_number' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128), 'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'size' => 128), 'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode', 'size' => 12), 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64), 'other' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 300), 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), 'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), 'dni' => array('type' => self::TYPE_STRING, 'validate' => 'isDniLite', 'size' => 16), 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), ), ); make sure that you've got this: 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => false, 'size' => 128), 'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', required' => false, 'size' => 128), Link to comment Share on other sites More sharing options...
pixie1982 Posted July 25, 2013 Author Share Posted July 25, 2013 Thanks Vekia - two questions: 1. The other field also required, that relates to this code: 'other' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 300), How do amend it to remove this? 2. How do i change this to make the date of birth required too? I also need to do this and can't find it to make the change. Many thanks in advance. Link to comment Share on other sites More sharing options...
vekia Posted July 25, 2013 Share Posted July 25, 2013 you can define which fields are reuqired by adding to the field definition 'required'=>true option Link to comment Share on other sites More sharing options...
Valsirob Posted March 4, 2015 Share Posted March 4, 2015 Hello, I have the following problem: When a customer is entering his VAT number as a company, Prestashop generate a message that the VAT number is not correct. I have not checked under the VAT module the VAT number to be checked. Further, if I enter in the customer details via the back office and enter myself the VAT number, still rejected...looks like I cannot accept VAT numbers on the field named VAT number (SIRET). I'm I translating/using the wrong field? I just open a B2B folder and started a campaign...but looks not nice, since the potential Companies cannot register on our site with VAT number or they have to use one of the Name filed to add the VAT number...which is not very nice. Thanks for your feedback. rgds, Boris 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