Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How can I set "postcode" not required


Guest

Recommended Posts

Posted

I don't wanna postcode field to be filled as mandatory while a customer creats an account.

Currently this field must be filled out according to "min field lenght", but some of our customers want to leave this field blank. :o

I tried to make modification in creat_account.php but osC still asks for this field filled.

 

Thanks in advance. :rolleyes:

 

Snowbird

Posted

hi. in catalog/includes is a file called form check js.php

just find the relevant line fro post code and delete it. I tried this just and it worked fine, toi be on the safe side though down load another copy of the file to another direcrtory as a back up.

it is a form validation cade for the forma on the pages.

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

thanks for reply

 

and I think I must set postcode field as "null". default is "not null"

 

check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>, "<?php echo ENTRY_POST_CODE_ERROR; ?>");  

 

then i did your advice by disabled the above line and javascript control ok but this time a warning appears at upper of the form. (It says like "Postcode field must have min. x character") :o

 

should I change something in "create_account.php" in \catalog :unsure:

Posted

then I disabled the following code in create_account.php" and now works. :)

if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
     $error = true;

     $messageStack->add('create_account', ENTRY_POST_CODE_ERROR);
   }

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...