
Originally Posted by
fernzys
Thank you very much .. works fine..
but still having error with the date.. zen cart doesnt accept the date in yyyy/mm/dd or yyyymmdd or yyyy-mm-dd . changes it to a weird date..
also the addon does accept it as mmddyyyy
Here's what I did to make it accept MM/DD/YYYY dates (like every other mod for the US :)
In add_customer_backend.php, around line #601 there are the following lines:
Code:
$month = (int)substr($customers_dob, 4, 2);
$day = (int)substr($customers_dob, 6, 2);
$year = (int)substr($customers_dob, 0, 4);
...delete them. You can also delete the error message that follows, if it annoys you:
Code:
if (!checkdate($year, $month, $day)) {
$errors[] = 'DOB is invalid (Must be YYYYMMDD, YYYY/MM/DD or YYYY-MM-DD)';
}
Do a search in the file for "dob" and change any references of 0001-01-01 to 01-01-0001. I think only 1 of them stays changed because the other one seems to be called from the database. If you wanted to, you could go into your db and change that as well. I did not.
That is what I did and it takes (and keeps!) MM/DD/YYYY just fine.
** I am not guaranteeing anything. Just saying what works for me :)