customers_dob field DEFAULT '1970-01-01 00:00:01'

Open to all! Ask other shopowners for help.
Post Reply
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

customers_dob field DEFAULT '1970-01-01 00:00:01'

Post by loop »

hi All
The standard value of de customers_dob (in customers table) is '1970-01-01 00:00:01' ( i know the reason because timestamp...)

But the problem is, whenn customer don't give the dob, it's saved as '1970-01-01 00:00:01' and that makes problem with different things, as this date is also a "real" date, so for example birthday wishes automatic emails, will be sent on this date or my payment provider needs dob for verification and if it's not set it's asked for the birthday, but as it's set to '1970-01-01 00:00:01' the provider refuse the verification as the dob is no match.

and whenn customer whant to add DOB in customerprofile (account_edit.php) he see also 1970-01-01 00:00:01

Is there a other possibility? why its not "null" or "" ?
is there a workarround?

or is this really the way to go and i have to set always like this:
if ( ! empty( $order->customer['customers_dob'] ) && $order->customer['customers_dob'] != '1970-01-01 00:00:01')

thanks for the help


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply