Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25
  1. #21
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Sale Ending/Special Ending Support thread

    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.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  2. #22
    Join Date
    Jan 2010
    Posts
    48
    Plugin Contributions
    0

    Default Re: Sale Ending/Special Ending Support thread

    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
    Code:
                $enddate = $specials->fields['unix_expires_date']; 
                $enddate_ts = strtotime("-1 day", $enddate);
                $enddate = date("Y-m-d H:i:s", $enddate_ts);
    to
    Code:
                $enddate = $specials->fields['expires_date']; 
                $enddate_ts = strtotime("-1 day ".$enddate);
                $enddate = date("Y-m-d H:i:s", $enddate_ts);
    Change lines 38-40 from
    Code:
             $enddate = $sales->fields['unix_sale_date_end']; 
             $enddate_ts = strtotime("-1 day", $enddate);
             $enddate = date("Y-m-d H:i:s", $enddate_ts);
    to
    Code:
             $enddate = $sales->fields['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.

  3. #23
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Sale Ending/Special Ending Support thread

    The countdown timer feature has been added to sale ending/special ending in the latest version.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #24
    Join Date
    Feb 2009
    Posts
    861
    Plugin Contributions
    0

    Default Re: Sale Ending/Special Ending Support thread

    Does that have a DATE countdown only or also an HOUR countdown?

  5. #25
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Sale Ending/Special Ending Support thread

    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.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. v151 Customer sessions not ending
    By jeking in forum General Questions
    Replies: 2
    Last Post: 3 Nov 2015, 02:08 AM
  2. Downloads ending early -- incomplete files received
    By michelleherron in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 16 Sep 2008, 03:39 PM
  3. Happy ending thanks to Bluehost.com
    By mamasylvia in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 17 Mar 2008, 08:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR