Jump to content

How to make Zip/Postal code optional


Recommended Posts

  • 2 weeks later...

Can you simply remove the "required" class from the relevant tpl files?

eg. order-opc-new-account.tpl

 

So this:

 

<p class="required postcode text">
 <label for="postcode">{l s='Zip / Postal code'}</label>
 <input type="text" class="text" name="postcode" id="postcode" value="{if isset($guestInformations) && $guestInformations.postcode}{$guestInformations.postcode}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
 <sup>*</sup>
</p>

 

to this:

<p class="postcode text">
 <label for="postcode">{l s='Zip / Postal code'}</label>
 <input type="text" class="text" name="postcode" id="postcode" value="{if isset($guestInformations) && $guestInformations.postcode}{$guestInformations.postcode}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
</p>

Link to comment
Share on other sites

  • 4 years later...
  • 4 months later...

It is now possible on  version 1.6.*

You can make zip code optional for each country.

To do that, go to Countries page on back office and edit particular country that you want to disable Zip Code.

And choose "No" for Does it need Zip/postal code? option

 

You can control all or 'some' countries by running SQL on database. The following query will disable zip code on all countries:

UPDATE `ps_country` SET need_zip_code = 0 
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...