khamulete Posted May 1, 2011 Share Posted May 1, 2011 HiI'm using prestashop 1.4 and i'm trying to make the postal code not obligatory when a new user registers in my site.I've done what I've seen i'm supposed to:- Make sure that "postcode" is not in the array $fieldsRequired from /classes/address.php- Commented the code where the post code is shown in ..../theme/address.tpl and ..../theme/autentication.tpl, so it dows not appear in the registration form or anywhere else.Yet, registration process is still asking for the postal code!I even put "postcode" in $fieldsRequired to see what would happen and prestashop threw 2 errors saying that post code is needed (shown in attached image. it's in spanish).Where else should I take a look so post code is not obligatory?This is what my /classes/address.php file looks like, around $fieldsRequired array. protected static $_idZones = array(); protected static $_idCountries = array(); protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'city'); protected $fieldsSize = array('alias' => 32, 'company' => 32, 'lastname' => 32, 'firstname' => 32, 'address1' => 128, 'address2' => 128, 'postcode' => 12, 'city' => 64, 'other' => 300, 'phone' => 16, 'phone_mobile' => 16, 'dni' => 16); protected $fieldsValidate = array('id_customer' => 'isNullOrUnsignedId', 'id_manufacturer' => 'isNullOrUnsignedId', 'id_supplier' => 'isNullOrUnsignedId', 'id_country' => 'isUnsignedId', 'id_state' => 'isNullOrUnsignedId', 'alias' => 'isGenericName', 'company' => 'isGenericName', 'lastname' => 'isName','vat_number' => 'isGenericName', 'firstname' => 'isName', 'address1' => 'isAddress', 'address2' => 'isAddress', /*'postcode'=>'isPostCode',*/ 'city' => 'isCityName', 'other' => 'isMessage', 'phone' => 'isPhoneNumber', 'phone_mobile' => 'isPhoneNumber', 'deleted' => 'isBool', 'dni' => 'isDniLite'); Thanks in advance Link to comment Share on other sites More sharing options...
jacky75 Posted May 2, 2011 Share Posted May 2, 2011 If I've properly understood, you can do what you need using the backoffice. Go to "Shipping/Countries" and change the Zip code is mandatory in each country settings. Link to comment Share on other sites More sharing options...
khamulete Posted May 2, 2011 Author Share Posted May 2, 2011 that was it. Thank you very much Link to comment Share on other sites More sharing options...
jacky75 Posted May 3, 2011 Share Posted May 3, 2011 Ok, please mark this thread as SOLVED. 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