-
Sale Ending/Special Ending Support thread
My Sale Ending/Special Ending contribution is now available from the downloads area here:
http://www.zen-cart.com/index.php?ma...oducts_id=1662
Sale Ending/Special Ending was inspired by a Twitter post from e-Commerce expert Jason Billingsley, who suggested
"When putting items on sale, express the sale end date to add urgency."
The Sale Ending/Special Ending contribution shows the end date of the sale or special (as long as the End Date or Expiry Date has been set for that sale or special) on the product info page. Installation instructions are provided in the readme file.
-
Re: Sale Ending/Special Ending Support thread
hello, thank you for this mod, i use it for my specials,
i set the special expiry date jun 20 from admin, the special ends on jun 19 (this is zencart default setting, i dont know how to change), and it displays special expries on jun 20 on product info page.
so the real expiry date is one day earlier than the expiry date displays on product info page. what do i fix this?
-
Re: Sale Ending/Special Ending Support thread
June 20th starts at Midnight June 20th which is 1 minute after June 19th 11:59pm ...
Did you want the special to end June 20th at midnight or really June 21st at Midnight which is 1 minute after June 20th 11:59pm? :unsure:
-
Re: Sale Ending/Special Ending Support thread
I've always thought it would be helpful to display the ending date of a sale or special. Thanks for the mod!.
I also find the expiration date misleading. If the sale expires "today", it should be available until "today" ends. Customers will easily be confused if the site says sales ends June 20th and they return on the 20th to find the sale is over.
Any way to change the way this works?
Also, I'd like to change the way the date is displayed. Instead of 'Special expires Friday 16 July, 2010' I'd like 'Special expires Friday, July 16, 2010'
Thanks!
-
Re: Sale Ending/Special Ending Support thread
In the add-on code I found zen_date_long and changed it to zen_date_short. It now displays 7/16/2010. What other date options/commands are available?
-
Re: Sale Ending/Special Ending Support thread
Has there been any coding so that if the sale ends TODAY, it is still available TODAY? so if it says sale until Dec 31, it will be available ALSO on Dec 31?
I would LOVE to install that mod, but without confusing the customers (i am confused enough myself when setting the sale dates!)
-
Re: Sale Ending/Special Ending Support thread
Hi Software Guy,
Thanks for all of your great contributions!
I just installed your sale ending/special ending module into my 1.3.9h install, however, the sale end date is not appearing on products on sale or on special. I double-checked to make sure all was uploaded to my root directoy (where index.php is located) made sure to change the name of "custom" to the name of my template, but no luck. I manually merged your tpl_product_info_display.php (using WinMerge) with my existing version, as it has been modified to show that items are "in stock" instead of showing the quantity of product on hand. Would that have anything to do with the sale end dates not appearing on products? Or, is there something I'm missing?
Thanks, in advance, for your help!
Ken
website is www.houseofjoypublishing.com
-
Re: Sale Ending/Special Ending Support thread
Enough folks have asked the question CaroleAs and jeking asked that I have made this an option. If you want your sale to end on June 20 at midnight, set the end date in Salemaker to June 21 and set this option in Sale Ending, and it will show June 20th. This option will be available in the next release of Sale Ending in March.
-
Re: Sale Ending/Special Ending Support thread
Not to want to seem picky, but *IF* you could also incorporate some code so there is an indication of "Last day of the sale" when it happens to be the last day (like June 20th in this example), it would be cool (even easier for the customer). But maybe i am just dreaming an idea.
-
Re: Sale Ending/Special Ending Support thread
Quote:
Originally Posted by
swguy
Enough folks have asked the question CaroleAs and jeking asked that I have made this an option. If you want your sale to end on June 20 at midnight, set the end date in Salemaker to June 21 and set this option in Sale Ending, and it will show June 20th. This option will be available in the next release of Sale Ending in March.
Fabulous Scott. Very much appreciated!
-
Re: Sale Ending/Special Ending Support thread
Version 1.1 of Sale Ending/Special ending has just been posted with instructions on how to make the sale ending date the actual date which is displayed (instead of 1 day earlier).
-
Re: Sale Ending/Special Ending Support thread
Works great, thank you for the update!
-
Re: Sale Ending/Special Ending Support thread
How can I change the date displayed format 21 April, 2011, to April 21, 2011 or 4/21/11?
-
Re: Sale Ending/Special Ending Support thread
Never mind. Of course I figured it out right after I posted the question. Here's how I changed it:
I modified \includes\functions\extra_functions\sale_special_ending.php
and changed the two instances of
if ($longdate) {
$date_str = zen_date_long($enddate);
} else {
$date_str = zen_date_short($enddate);
to
if ($shortdate) {
$date_str = zen_date_long($enddate);
} else {
$date_str = zen_date_short($enddate);
I just changed the word longdate to shortdate.
Amber
-
Re: Sale Ending/Special Ending Support thread
A better fix would be to modify the default value of the formal parameter $longdate in sale_special_ending() to false.
function sale_special_ending($id, $longdate = false, $one_day_back = false)
includes/functions/extra_functions/sale_special_ending.php.
-
Re: Sale Ending/Special Ending Support thread
Sale Ending/Special Ending is now Zen Cart 1.5.0 compatible. No other functional changes were made in version 1.2.
-
Re: Sale Ending/Special Ending Support thread
Hi swguy, I installed the mode and my specials expiration date is 11/01/12 so that the sale goes until 10/31 at midnight. If I leave $one_day_back = false) the date in the products description is 11/1. If I hange it to true, then the date in the product description is 10/30. Also, the date shows for example: Thursday 01 November, 2012. Is there a way to change the format so that it is Thursday, November 01, 2012?
-
Re: Sale Ending/Special Ending Support thread
The longdate within this plugin uses the settings for zen_date_long, which is set in includes/languages/english.php. Override this by copying it to includes/languages/YOUR_TEMPLATE/english.php, and change
define('DATE_FORMAT_LONG', '%A %d %B, %Y');
to
define('DATE_FORMAT_LONG', '%A %B %d, %Y');
-
Re: Sale Ending/Special Ending Support thread
Quote:
Originally Posted by
Ajeh
June 20th starts at Midnight June 20th which is 1 minute after June 19th 11:59pm ...
Did you want the special to end June 20th at midnight or really June 21st at Midnight which is 1 minute after June 20th 11:59pm? :unsure:
12:00 Midnight is the customer's Time or the Server's Time?
-
Re: Sale Ending/Special Ending Support thread
-
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.
-
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.
-
Re: Sale Ending/Special Ending Support thread
The countdown timer feature has been added to sale ending/special ending in the latest version.
-
Re: Sale Ending/Special Ending Support thread
Does that have a DATE countdown only or also an HOUR countdown?
-
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.