myzuhari Posted July 9, 2009 Share Posted July 9, 2009 I registered a new name as a member in my site www.beli-online.net. Things work fine when I filled up the fields until I noticed that without filling in the "state field" I also managed to register my name in the system successfully.This is my big problem for me as my carrier fee is based on the state.What make me more confuse is, there is a red asterisk at the state field showing that the field is required to be filled. If not we cannot proceed to the next process. But things do not happen that way. How to make a country as a required field? Link to comment Share on other sites More sharing options...
Ion_Cannon Posted August 15, 2009 Share Posted August 15, 2009 I registered a new name as a member in my site www.beli-online.net. Things work fine when I filled up the fields until I noticed that without filling in the "state field" I also managed to register my name in the system successfully.This is my big problem for me as my carrier fee is based on the state.What make me more confuse is, there is a red asterisk at the state field showing that the field is required to be filled. If not we cannot proceed to the next process. But things do not happen that way. How to make a country as a required field? Prestashop by default allows you to register without entering a state. If you want the state field or any other like Home Phone" to be required you need to edit the class file "Address.php" look for the following line:protected $fieldsRequired = array('id_country', Make it look like this: protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'postcode', 'city', 'id_state'); Link to comment Share on other sites More sharing options...
rubenmdeg Posted January 7, 2011 Share Posted January 7, 2011 Hello...and if i want to make the field COUNTRY unrequired...how can i do that...Thanks Link to comment Share on other sites More sharing options...
rocky Posted January 7, 2011 Share Posted January 7, 2011 You can't. PrestaShop requires it to calculate taxes and shipping costs. The best you can do is set a default country, then use CSS to hide the country dropdown and field. Link to comment Share on other sites More sharing options...
darqor Posted February 25, 2012 Share Posted February 25, 2012 How can i set a country default and hide it? Thank you 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