Quote Originally Posted by plbs View Post
Well, I'm a PHP and ZC newb, so I don't know if this is the ideal solution, but I did come up with a fix for my #2 problem above.

I edited admin\includes\function\general.php, specifically the three date conversion functions, zen_date_long, zen_date_short, and zen_datetime_short

Each of those starts with an if ... return false statement to trap essentially blank input. It was trapping '0001-01-01 00:00:00' as a "blank" date, but I found that my NULL date field was actually evaluating to "0000-00-00" as a string. So I added another OR to each of those IF statements:

function zen_date_long($raw_date) {
if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '0000-00-00') || ($raw_date == '') ) return false; //<-- edited this line



function zen_date_short($raw_date) {
if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '0000-00-00') || ($raw_date == '') ) return false; //<-- edited this line



function zen_datetime_short($raw_datetime) {
if ( ($raw_datetime == '0001-01-01 00:00:00') || ($raw_datetime == '0000-00-00') || ($raw_datetime == '') ) return false; //<-- edited this line
Hey Steve,

I have been aware of this issue where when no date is selected, it reflects as being entered from 1999 or something weird, but i have been lax on updating this, and i apologize.

With regard to your changes listed above, you have edited core functions that zen cart also uses in other various places. So, while you may have fixed the display with order delivery date, you may have broken another part of the application.

In my last response from a few minutes ago regarding your first issue listed, i said that i would test the session fix within the next day or so. I will also try to write a new function JUST for order delivery date to address this issue.