Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Details


MoisesZaragoza

Recommended Posts

this is where it forces an error if its left blank or its invalid (catalog\create_account.php)

 

    if (ACCOUNT_DOB == 'true') {
     if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {
       $error = true;

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

 

when the second "if" fails forces the error onto stack. Finally just remove the asterisk from the html body

Link to comment
Share on other sites

Thanks

 

Actualy what I did was

 

if (ACCOUNT_DOB == 'true') {
    if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {
      $error = true;

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

 

I change it to

 

if (ACCOUNT_DOB == 'true') {
    if (checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4)) == false) {
     # $error = true;

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

 

but I still had to modify the Javascript

 

That's in the includes/form_check.js.php

 

and I comment the line

 

 

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

at the end of the day the code will be good

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...