Jari646 Posted January 6, 2006 Share Posted January 6, 2006 Ha ha, yes, that's a good one. I discovered that myself also a while ago and I think, haven't checked it really because I do only very special offers on the same day, it will just show again on the next day at the start time. So every day until the end date it shows for the begin and end time you have set for the product. There is no relation between end time and end date as it seems. So I can go around it examble if I but the start time 00.00.01 and end time 23.59.00 In that case this is not problem at all. Thank you very much :D Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted January 6, 2006 Share Posted January 6, 2006 So I can go around it examble if I but the start time 00.00.01 and end time 23.59.00In that case this is not problem at all. Thank you very much :D Guess so, yes :D Just tried a little on a local installation and it indeed shows and goes in between the time set for every day. When you have the time set for, almost, the whole day it will show continiously until the end date applies. Quote Link to comment Share on other sites More sharing options...
100asa Posted January 20, 2006 Share Posted January 20, 2006 what's the mean of "special price" and "expiry date" if it's don't work? If I stop happy hour offer for this product, I can't see it in special price offer. Quote Skype: centoasa Skype: remigioruberto Link to comment Share on other sites More sharing options...
100asa Posted January 20, 2006 Share Posted January 20, 2006 Another problem: after the first offer, the other don't work! Quote Skype: centoasa Skype: remigioruberto Link to comment Share on other sites More sharing options...
100asa Posted January 23, 2006 Share Posted January 23, 2006 With wheeloftime modify (see post #4) I can only see the offer when start date ad today date is equal. Quote Skype: centoasa Skype: remigioruberto Link to comment Share on other sites More sharing options...
Jack Whitman Posted April 10, 2006 Share Posted April 10, 2006 Hi Wheel of Time, I think the idea is great. It helps me sell stuff I need to get rid of without violating price agreements. As an American, I find the 24:00 o'clock awkward. Is there any way I can change it so it reads: 12:00 PM? In addition, my server is 3:00 hours ahead of my time. How can I modify the code to subtract 3:00 hours? I appreciate your response, I know it takes a lot of time to respond!!! I wish my PHP was better. I can read it, just don't know how to program it!!! Matt Holcomb Email me as a support ticket on my site at www.musicbizness.com. Quote Link to comment Share on other sites More sharing options...
M@verick Posted May 2, 2006 Share Posted May 2, 2006 (edited) Hi guys thx for this great mod which I would like to use.... BUT.... :lol: Admin side looks OK but catalog side.... big problem... :( It looks like the box doesn't call application_top.php I suppose it because of this error: Fatal error: Call to undefined function: tep_random_select() in c:\program files\easyphp1-8\www\catalog\includes\boxes\happy_hours_specials_basic.php on line 20 All functions are not recognized and they exist in my general.php... I saw on the contrib download page that Sanden had the same problem... I've searched on this thread but no response.... Any ideas? ;) Edited May 2, 2006 by M@verick Quote Link to comment Share on other sites More sharing options...
RMH Posted May 15, 2009 Share Posted May 15, 2009 I have now tried everyting in this post, but items on Happy Hour does not display the correct price (The price is only correct in the box). In the product list it only display regular price or specials price. If somebody has got this modul to work, I would be very thankfull for any suggestions on how to make it work :-) Quote Link to comment Share on other sites More sharing options...
Sylvester99 Posted December 3, 2009 Share Posted December 3, 2009 Just a note to anyone who wants 12 hour time format shown in the Happy Hour box: Find the following in catalog/includes/boxes/happy_hours_specials_basic.php: $uhrzeitbis = substr($random_product['happy_hours_end_time'], '0', '5'); And add after it: $uhrzeitbis = DATE("h:i A", STRTOTIME($uhrzeitbis )); This will display the time as: 05:06 PM From the PHP Date function info, you can change the way the date looks as follows: a - Lowercase Ante meridiem and Post meridiem - am or pm A - Uppercase Ante meridiem and Post meridiem - AM or PM g - 12-hour format of an hour without leading zeros - 1 through 12 G - 24-hour format of an hour without leading zeros - 0 through 23 h - 12-hour format of an hour with leading zeros - 01 through 12 H - 24-hour format of an hour with leading zeros - 00 through 23 i - Minutes with leading zeros - 00 to 59 I fought with this contrib for many hours before finally getting it to fully work as it is supposed to, and to change the time to 12 hour format. Good luck to anyone who tries, however if you are after this feature, it is an awesome contrib. Quote Link to comment Share on other sites More sharing options...
Sylvester99 Posted December 9, 2009 Share Posted December 9, 2009 Just a quick hint for anyone having trouble with this contrib. After many hours of toying and playing, I found the following code change helped fix a problem with the dates having to overlap for it to work, and even then it still wasn't right. The change involved is replacing the code now() with curdate(). In includes/function/general.php replace the inserted code: ///Added Happy hours specials function tep_get_products_special_price($product_id) { $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status = '1'"); $product = tep_db_fetch_array($product_query); // next check is Happy hours specials check,if specials_hour exist and valid it will return the special_hour price $happy_time = date ("H:i:s"); $product_query2 = tep_db_query("select specials_price_happy_hours from " . TABLE_HAPPY_HOURS_SPECIALS_BASIC . " where products_id = '" . (int)$product_id . "' and status_happy_hours='1' and '" .$happy_time. "' BETWEEN happy_hours_beginning_time and happy_hours_end_time and now() > happy_hours_beginning_date and now() < happy_hours_end_date"); $product2 = tep_db_fetch_array($product_query2); if ($product2){$product['specials_new_products_price'] = $product2['specials_price_happy_hours'];} return $product['specials_new_products_price']; } // End Happy hours specials With: ///Added Happy hours specials function tep_get_products_special_price($product_id) { $product_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status = '1'"); $product = tep_db_fetch_array($product_query); // next check is Happy hours specials check,if specials_hour exist and valid it will return the special_hour price $happy_time = date ("H:i:s"); $product_query2 = tep_db_query("select specials_price_happy_hours from " . TABLE_HAPPY_HOURS_SPECIALS_BASIC . " where products_id = '" . (int)$product_id . "' and status_happy_hours='1' and '" .$happy_time. "' BETWEEN happy_hours_beginning_time and happy_hours_end_time and CURDATE() > happy_hours_beginning_date and CURDATE() < happy_hours_end_date"); $product2 = tep_db_fetch_array($product_query2); if ($product2){$product['specials_new_products_price'] = $product2['specials_price_happy_hours'];} return $product['specials_new_products_price']; } // End Happy hours specials I hope this helps someone. :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.