support

Author Topic: change the ZIP code field into an optional field  (Read 6292 times)

Offline innomu

  • Newbie
  • *
  • Posts: 4
  • Karma: +1/-0
    • View Profile
change the ZIP code field into an optional field
« on: July 31, 2017, 01:48:20 PM »
When a new customer is registering, the field called ZIP code is mandatory by default. How can I change it into a non-mandatory (Optional) field? Thanks

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 153
  • Karma: +28/-3
    • View Profile
Re: change the ZIP code field into an optional field
« Reply #1 on: August 01, 2017, 12:42:52 AM »
There is a validation process for "required" content.  If a required item is left blank, the system returns an error to the user. 

The change you wish to make is a 2-stage modification:
1 - you must find and disable the validation step for the specific item you wish to change from required to optional. 
2 - you must then change that item from required to optional. 

I successfully accomplished this type of modification on the "Star Rating" system, and described my steps here:
http://forum.abantecart.com/index.php/topic,5798.msg24935.html#msg24935

Summary: I disabled the validation step and then removed the item.

You want to disable validation and then "change to optional", rather than remove the item. 

I have seen posts on this board that described how to make the secondary change, just search for "required optional". 

A caution: you are trying to remove zip from registration, in an e-commerce app that uses zip as a key element of cart validation and eventually shipping.  You may be able to do it, but it will be quite a challenge.  My guess would be that there is only one zip anchor in the system, and it will be hard to divide it up so that registration doesn't require zip but cart and shipping validations do not fail due to zip problems stemming from your registration mod.     

Good luck. 


 

Powered by SMFPacks Social Login Mod