While doing my analysis for 1.5.4, I noticed this mod had a template file which changed in 1.5.3 which I missed, so I updated it. The update is now available on the downloads site.
Printable View
While doing my analysis for 1.5.4, I noticed this mod had a template file which changed in 1.5.3 which I missed, so I updated it. The update is now available on the downloads site.
I recently encountered the problem describe in post #17: I set the expiration date to 8/01/2016 only to have the date displayed as 7/30/2016 instead of the expected 7/31/2016. I've tracked the source of the problem to be that MySQL and PHP are operating in different timezones. In my case MySQL is operating in the Mountain Time Zone and PHP is operating in the Pacific Time Zone. The timestamp returned for 2016-08-01 00:00:00 by MySQL is interpreted as 2016-07-31 23:00:00 by PHP.
Studying the documentation for PHP's strtotime() function led me to the following solution. The only changes are in includes/functions/extra_functions/sale_special_ending.php.
Change lines 16-18 from
toCode:$enddate = $specials->fields['unix_expires_date'];
$enddate_ts = strtotime("-1 day", $enddate);
$enddate = date("Y-m-d H:i:s", $enddate_ts);
Change lines 38-40 fromCode:$enddate = $specials->fields['expires_date'];
$enddate_ts = strtotime("-1 day ".$enddate);
$enddate = date("Y-m-d H:i:s", $enddate_ts);
toCode:$enddate = $sales->fields['unix_sale_date_end'];
$enddate_ts = strtotime("-1 day", $enddate);
$enddate = date("Y-m-d H:i:s", $enddate_ts);
I also removed the ', UNIX_TIMESTAMP(...) as ...' from the SQL in lines 11 and 32.Code:$enddate = $sales->fields['sale_date_end'];
$enddate_ts = strtotime("-1 day ".$enddate);
$enddate = date("Y-m-d H:i:s", $enddate_ts);
The countdown timer feature has been added to sale ending/special ending in the latest version.
Does that have a DATE countdown only or also an HOUR countdown?
It prints out non-zero values for Months, Days, Hours, Minutes, Seconds.
If you go to the extended help on my website you can see a screenshot. The link is in the README file.