Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

date of birth -- make it as Optional ??


Wanwan

Recommended Posts

Posted

Hi

 

How I can get the date of birth change from * require field to Optional field?

:huh:

Wanwan -- %_%_

Posted
Hi

 

How I can get the date of birth change from * require field to Optional field?

:huh:

 

have you tried this?

Regards

 

Mark A Reynolds

Posted
Hi

 

How I can get the date of birth change from * require field to Optional field?

:huh:

 

You can do this from admin -> configuration -> customer details and set the Date of Birth to false

Contributions used: italian payment - Bonifico Bancario; Dynamic Meta Tags 1.0; Italian language for 2.2MS2; PayPal IPN Module v1.0; Purchase Without Account; Register Globals; Back buttons

Do you recommend me any other contribution?

Here is My Store, tell me how can I improve it!

Posted
You can do this from admin -> configuration -> customer details and set the Date of Birth to false

 

Tzig,

 

Thanks for your reply, however, this one will remove the DOB field. I think Mark's recommended links might be the answer. I am looking at the Feature contribution recommemded by Mark, see how it works!

 

Thank you folks

Wanwan -- %_%_

Posted
Tzig,

 

Thanks for your reply, however, this one will remove the DOB field. I think Mark's recommended links might be the answer. I am looking at the Feature contribution recommemded by Mark, see how it works!

 

Thank you folks

 

Oh, :P

Only now I realised that you want it to be an optional field.

I don't know what I was thinking about when I read your post. :-"

Anyway good luck! :thumbsup:

Contributions used: italian payment - Bonifico Bancario; Dynamic Meta Tags 1.0; Italian language for 2.2MS2; PayPal IPN Module v1.0; Purchase Without Account; Register Globals; Back buttons

Do you recommend me any other contribution?

Here is My Store, tell me how can I improve it!

Posted
have you tried this?

 

 

 

Mark,

 

The contribution is kind of complicated. I think this contribution added a powerful function for Admin page, and allow the admin person edit , add and change the field in Admin config page without modifying the internal php code. I hope I didn't misinterprete the custome_extra_field introduction.

 

 

Is there any simple method I can use for now? Just to Optional the DOB field. :blush:

Wanwan -- %_%_

Posted

Hi there,

I found one discussion about making dob optional -- dated 2003 for older version. However I can't find this code in english.php

 

Quote

Then you will need to go to /catalog/includes/language/english.php (or which ever language your using). And change this line.

 

CODE

 

 

define('ENTRY_DATE_OF_BIRTH_TEXT', ' <small>(eg. 05/21/1970) <font color="#AABBDD">required</font></small>');

 

Quote

 

Anyone know where this code is located for changing required to optional?

 

From Toolcrazy

" Making Date of Birth optional.

 

OK, this is tested on MS1. First go into Admin->Configuration->Minimum Values and set Date of Birth to 0 or just blank it out.

 

Then go it to: Admin->Configuration->Customer Details and set Date of Birth to true.

 

Then go to /catalog/includes/form_check.js.php and comment out this bit of code. about line 71.

 

CODE

 

 

if (document.account_edit.elements['dob'].type != "hidden") {

 

if (dob == '' || dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) {

 

error_message = error_message + "<?php echo JS_DOB; ?>";

 

error = 1;

 

}

 

}

 

 

 

Then go to /catalog/create_account_process.php

and comment out these two lines. about line 69

 

CODE

 

 

$error = true;

 

$entry_date_of_birth_error = true;

 

 

 

Then you will need to go to /catalog/includes/language/english.php (or which ever language your using). And change this line.

 

CODE

 

 

define('ENTRY_DATE_OF_BIRTH_TEXT', ' <small>(eg. 05/21/1970) <font color="#AABBDD">required</font></small>');

 

 

 

And change the word required to optional.

 

And that is it, customer can either fill in the field or leave it blank, if they do fill it in, it will be written to the database. "

Wanwan -- %_%_

Posted

:thumbsup:

 

Ok! by following toolcrazy's instructions, eventhough it is for MS1, I kind of got the DOB make it optional

 

Let me revise the instructions here for osC 2.2 version

 

Step 1....

 

First go into Admin->Configuration->Minimum Values and set Date of Birth to 0 or just blank it out.

 

Step 2...

goto: Admin->Configuration->Customer Details and set Date of Birth to true.

 

Step 3...

go to /catalog/includes/form_check.js.php and comment out this bit of code. about line 110.

 

CODE

 

 

<?php if (ACCOUNT_DOB == 'true') echo ' check_input("dob", ' . ENTRY_DOB_MIN_LENGTH . ', "' . ENTRY_DATE_OF_BIRTH_ERROR . '");' . "\n"; ?>

 

 

 

 

Then go to /catalog/create_account.php

and comment out these two lines. about line 81 and 83

 

CODE

 

 

$error = true;

 

$entry_date_of_birth_error = true;

 

 

Sorry for this step... I haven't found where the code's location!!!

 

Then you will need to go to /catalog/includes/language/english.php (or which ever language your using). And change this line.

 

CODE

 

 

define('ENTRY_DATE_OF_BIRTH_TEXT', ' <small>(eg. 05/21/1970) <font color="#AABBDD">required</font></small>');

 

 

 

And change the word required to optional.

And that is it, customer can either fill in the field or leave it blank, if they do fill it in, it will be written to the database.

 

 

Thanks to toolcrazy!!

 

By the way, if anyone know where this code's location

CODE:

define('ENTRY_DATE_OF_BIRTH_TEXT', ' <small>(eg. 05/21/1970) <font color="#AABBDD">required</font></small>');

EOC

please update it ....

Wanwan -- %_%_

Posted

This is the full set of instructions for modifying the DOB to optional field for MS2, 2.2

 

Step 1....

 

First go into Admin->Configuration->Minimum Values and set Date of Birth to 0 or just blank it out.

 

Step 2...

goto: Admin->Configuration->Customer Details and set Date of Birth to true.

 

Step 3...

go to /catalog/includes/form_check.js.php and comment out this bit of code. about line 110.

 

CODE

 

 

<?php if (ACCOUNT_DOB == 'true') echo ' check_input("dob", ' . ENTRY_DOB_MIN_LENGTH . ', "' . ENTRY_DATE_OF_BIRTH_ERROR . '");' . "\n"; ?>

 

 

 

 

Then go to /catalog/create_account.php

and comment out these two lines. about line 81 and 83

 

CODE

 

 

$error = true;

 

$entry_date_of_birth_error = true;

 

 

 

 

Then you will need to go to /catalog/includes/language/english.php (or which ever language your using). About line 184

 

CODE

 

define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 05/21/1970)');

 

And change the * to optional.

 

example:

define('ENTRY_DATE_OF_BIRTH_TEXT', 'Optional (eg. 05/21/1970)');

 

 

 

 

And that is it, customer can either fill in the field or leave it blank, if they do fill it in, it will be written to the database.

 

Thanks to toolcrazy's tips

Wanwan -- %_%_

Archived

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

×
×
  • Create New...