Jump to content

How to remove zip code field from registration form?


Recommended Posts

Hi,
My store does not need to have a zip code required in its form but I'm having problems removing it, I don't really understand what to do. I know which files to manipulate to edit the form...but I can't remove the zip code field from the registration form without running into problems. When I remove the zip code field and submit the form (as a test) it says "Error: Zip code required." Can anyone help me to rectify this problem?? Any help will be appreciated.

Thanks so much.

Link to comment
Share on other sites

You will need to edit this line near the top of classes/Address.php, which specifies which fields are required:

protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'postcode', 'city');



Remove 'postcode', from this line. You should then remove the following line after 'Postal code / Zip code' in address.tpl and authentication.tpl to let the user know it is not required:

*

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I've followed what you said and all went ok ( THANKS ) .

Can you please tell me how to skip the Address and Shipping pages and when i'll press checkout to go directly to Payment page ?

It won't need the adress and shipping coz the things i want to sell are ONLINE .

Any advice is apreciated.

Thank you.


You will need to edit this line near the top of classes/Address.php, which specifies which fields are required:

protected $fieldsRequired = array('id_country', 'alias', 'lastname', 'firstname', 'address1', 'postcode', 'city');



Remove 'postcode', from this line. You should then remove the following line after 'Postal code / Zip code' in address.tpl and authentication.tpl to let the user know it is not required:

*

Link to comment
Share on other sites

  • 2 years later...

So you removed code from authentication.tpl, but it wasn't removed on your site? Most likely, that means you have "Force compile" disabled, so the TPL file isn't being recompiled. Go to the Preferences > Performance tab and change "Force compile" to "Yes", then click "Save", then refresh your registration page. Change "Force compile" back to "No" again once you've finished editing TPL files.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...