Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trouble with installing "Happy Hour offer" contribution


Recommended Posts

This part from the function tep_get_products_special_price you will/should find in (catalog)/includes/functions/general.php. Look at the installation instructions from HHSP.

HI wheeloftime, you seem to be the top dog for hhsp!

I'm struggling too to get this to work properly; the tep_get_products_special_price section isn't mentioned in my install.txt - i've searched for it and while general.php has many amendments, I can't see that bit. I'm also a bit unsure what should be seen within the price hammer box, should a reduced price show as well as the normal price.

Grateful of any help you can offer.

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

HI wheeloftime, you seem to be the top dog for hhsp!

wrong :P

 

I'm struggling too to get this to work properly; the tep_get_products_special_price section isn't mentioned in my install.txt - i've searched for it and while general.php has many amendments, I can't see that bit.

Strange, it's clearly visible/mentioned there. Be aware it is for your catalog side !

 *****************************************************************************
EN: Replace in includes/function/general.php
DE: Ersetze in includes/function/general.php  

line95

  /* 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");
$product = tep_db_fetch_array($product_query);

return $product['specials_new_products_price'];
 }
*/

with / mit:

///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

 

I'm also a bit unsure what should be seen within the price hammer box, should a reduced price show as well as the normal price.

It shows about the same as products on special are shown; the normal price with the special price underneath. Except with hhsp the specific (end) time it is valid is shown also.

Link to comment
Share on other sites

wrong :P

Strange, it's clearly visible/mentioned there. Be aware it is for your catalog side !

 *****************************************************************************
EN: Replace in includes/function/general.php
DE: Ersetze in includes/function/general.php  

line95

  /* 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");
$product = tep_db_fetch_array($product_query);

return $product['specials_new_products_price'];
 }
*/

with / mit:

///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

It shows about the same as products on special are shown; the normal price with the special price underneath. Except with hhsp the specific (end) time it is valid is shown also.

Thanks for the response. I think I have a different version of the contributuon, I cannot locate '95' or 'product_query2' in the install.txt file. Seems to be working now (to a degree) in that index.html is showing a hammer price product in the box. I do find the descending price quite strange though, in that if you refresh the page, it counts down from the full price again. I was expecting to get a price reflecting how far through the auction it was, not always starting at full price - this means that two or more potential customers would see two or more different prices at the same time - have I missed something here or am I expecting too much of it?

Link to comment
Share on other sites

Thanks for the response. I think I have a different version of the contributuon, I cannot locate '95' or 'product_query2' in the install.txt file. Seems to be working now (to a degree) in that index.html is showing a hammer price product in the box. I do find the descending price quite strange though, in that if you refresh the page, it counts down from the full price again. I was expecting to get a price reflecting how far through the auction it was, not always starting at full price - this means that two or more potential customers would see two or more different prices at the same time - have I missed something here or am I expecting too much of it?

 

Are you sure you are talking about the same contrib ? The Happy Hour contrib is not an auction based contrib, you just set a very special price to a product which is valid for a couple of hours, one hour or whatever time frame you want to use for it. The price shown is the same for everyone.

Link to comment
Share on other sites

Are you sure you are talking about the same contrib ? The Happy Hour contrib is not an auction based contrib, you just set a very special price to a product which is valid for a couple of hours, one hour or whatever time frame you want to use for it. The price shown is the same for everyone.

I'm sure now that it is different - the one I have allows the happy hour price but also has a reserve auction element too - that's the bit I'm interested in. It came off the contributions site and is called 'Now or never! - The price hammer box (dutch auction)' - if I get anything to do what I expect, I'll post back to this thread.

Link to comment
Share on other sites

I'm sure now that it is different - the one I have allows the happy hour price but also has a reserve auction element too - that's the bit I'm interested in. It came off the contributions site and is called 'Now or never! - The price hammer box (dutch auction)' - if I get anything to do what I expect, I'll post back to this thread.

 

Ah, Simon, now it's clear. I remember the maker of the Happy Hour contrib indeed made another one with a more auction based idea. Maybe you better create a new thread for that as it is another contrib and so needs other feedback.

 

regards,

Howard

Link to comment
Share on other sites

Is anyone using the STS template contrib with the HappyHour contrib???

 

I have been playing around trying to get the HappyHour Specials to show up properly in my template all afternoon long.

 

The problem appears to be how the HappyHour contrib is called.

 

STS Template calls the column_left and column_right.php scripts and them combines them together into one window. Only problem with this is the HappyHour contrib is loaded in either one of these two scripts. No matter which script you load it in when the HappyHour special is on the formatting goes to hell!!!

 

You get the normal contect area of your store filled with nothing but the happy hour special.

Your footer/banner area then becomes the contect area of your site.

 

If anyone is using these two contribs together and has worked through this problem please let me know. I like of them but presently I cant seem to use them at the same time.

Link to comment
Share on other sites

  • 2 weeks later...

i've followed all of the suggestions in this thread and the last two most recent updates in the contribution section, but my happy hour products won't show. no errors, nothing. everything seems to be working in the admin panel.

 

do you have to use the column_left.php edit? i really don't want the happy hours in an infobox.

Edited by eww
Link to comment
Share on other sites

i've followed all of the suggestions in this thread and the last two most recent updates in the contribution section, but my happy hour products won't show. no errors, nothing. everything seems to be working in the admin panel.

 

do you have to use the column_left.php edit? i really don't want the happy hours in an infobox.

 

It's designed to be used within an infobox but you can of course rewrite it as you like and have it outside an infobox. If you made the changes correctly I can think of no reason why the box doesn't show. Are you sure you filled in the happy hours date and times correctly ? It should be day month year and hour minutes seconds.

Link to comment
Share on other sites

here's what my test product has:

 

Expiry Date: 31 12 2005

Beginning Happy Date: 22J- 12M- 2005A

End Date Happy Hour: 31J- 12M- 2005A

Start Time Happy Hours: 12H- 52Mn- 00S

End Time Happy Hour: 12H- 53Mn- 00S

Link to comment
Share on other sites

here's what my test product has:

 

Expiry Date: 31 12 2005

Beginning Happy Date: 22J- 12M- 2005A

End Date Happy Hour: 31J- 12M- 2005A

Start Time Happy Hours: 12H- 52Mn- 00S

End Time Happy Hour: 12H- 53Mn- 00S

 

Your local time is now, if I am correct, around 2.20 PM which writes like 14:20:00.

So when testing you should have the box with a start time of let's say 13:00:00 and end time of 15:00:00.

With those times and a correct date the box must show and if it doesn't you missed some changes.

Link to comment
Share on other sites

time now: 2: 16, server time 1:16

 

tried this:

Original Price: $15.99

New Price: $2.00

Percentage: 87%

 

Expires At: 12/31/2005

 

Start Happy Date: 12/23/2005

End Happy Date: 12/31/2005

 

Start Time: 01:17:00

End Time: 01:18:00

New Price: $2.00

Percentage: 87%

 

Status Change:

 

Status Change Happy Hours

Link to comment
Share on other sites

time now: 2: 16, server time 1:16

 

tried this:

Original Price: $15.99

New Price: $2.00

Percentage: 87%

 

Expires At: 12/31/2005

 

Start Happy Date: 12/23/2005

End Happy Date: 12/31/2005

 

Start Time: 01:17:00

End Time: 01:18:00

New Price: $2.00

Percentage: 87%

 

Status Change:

 

Status Change Happy Hours

 

No joy I understand ?! What happens if you have a test case with a start and end date for today and a start and end time of which you are sure there are couple of hours in between ?

Link to comment
Share on other sites

just tried:

 

Original Price: $15.99

New Price: $2.00

Percentage: 87%

 

Expires At: 12/31/2005

 

Start Happy Date: 12/23/2005

End Happy Date: 12/23/2005

 

Start Time: 02:00:00

End Time: 04:00:00

New Price: $2.00

Percentage: 87%

 

Status Change:

 

Status Change Happy Hours

 

 

:(

 

is there an edit i could have missed somewhere? i do not receive any errors in the admin panel or shop at all

 

also, what is "Status Change:"?

Link to comment
Share on other sites

just tried:

 

Original Price: $15.99

New Price: $2.00

Percentage: 87%

 

Expires At: 12/31/2005

 

Start Happy Date: 12/23/2005

End Happy Date: 12/23/2005

 

Start Time: 02:00:00

End Time: 04:00:00

New Price: $2.00

Percentage: 87%

 

Status Change:

 

Status Change Happy Hours

:(

 

is there an edit i could have missed somewhere? i do not receive any errors in the admin panel or shop at all

 

also, what is "Status Change:"?

 

I didn't get any errors either but I couldn't get the original contribution working for my life until I made those small changes I described. Forget about that 'Status Change', I suppose it should have said something more informative but as I don't care what's written there I have put no time into it to investigate.

The changes I described in post #4 and post #12 were the absolutely essential ones to this contrib showing so you should check if you did both !

A thing I didn't check is about the date format. It is day, month, year which is fine for most of us Europeans but it might be different if your system is setup for month, day, year.

If you are 100% sure you made those changes correctly it might be something with that. I can't find a website like in your card otherwise I could have had a look if it would work through here.

PM me if you would like to have a test like that !

 

Howard

Link to comment
Share on other sites

double checked the edits, they're there. still no luck :(

also tried to do m/d/y - nothing there either

 

would you be willing to take a peek at my admin settings? i could provide a temporary login for you

Link to comment
Share on other sites

i do not know why i cannot edit my post (hence the double post), but when i created a new page to output a sale item, it doesn't show.

 

the items are saved to the database properly, but the item output is shown as mysite.com/product/.html and the image is mysite.com/images

 

price is $0.00

 

the problem lies somewhere in one of the codes that is parsing these items as sales instead of regular priced items.

 

for the life of me, i cannot uninstall this contribution either :o when i put my backups on, i get a "cannot redeclare class shoppingcart in includes/class/shopping_cart.php (yes, ALL original files were replaced)

 

i'm going to have to just stick with the original specials module. i have tried just about everything i can think of to get this to work.

 

does anybody know why my original files won't work properly anymore? this baffles me beyond belief.

Link to comment
Share on other sites

i was able to successfully remove it after 4 tries :)

i still do not know what's wrong with it (i'm not advanced in php)

 

but it looked to be conflicting somehow with chemo's cache module.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

Is it possible to make this "happy Hour offer" to "Offer of the week"?

 

I know that I can change the box headline to the Offer of the Week, but how can I change end time to end date and time?

Link to comment
Share on other sites

Change

BOX_TEXT_HAPPY_HOURS1 . $uhrzeitbis . BOX_TEXT_HAPPY_HOURS2

to something like

BOX_TEXT_HAPPY_HOURS1 . tep_date_short($random_product['happy_hours_end_date'])
. BOX_TEXT_YOU_HAVE_TO_CREATE_EXTRA . $uhrzeitbis . BOX_TEXT_HAPPY_HOURS2

in (catalog)/includes/boxes/happy_hours_specials_basic.php

Link to comment
Share on other sites

Change

BOX_TEXT_HAPPY_HOURS1 . $uhrzeitbis . BOX_TEXT_HAPPY_HOURS2

to something like

BOX_TEXT_HAPPY_HOURS1 . tep_date_short($random_product['happy_hours_end_date'])
. BOX_TEXT_YOU_HAVE_TO_CREATE_EXTRA . $uhrzeitbis . BOX_TEXT_HAPPY_HOURS2

in (catalog)/includes/boxes/happy_hours_specials_basic.php

 

Thank s that did it :D

 

Now I have new problem.

 

I run a test and put the start date 06.01.2006 clock 15.25 and end date to 10.01.2006 clock 15.30

The Happy Hour box don t show anymore after 06.01.2006 clock 15.30? ;)

Link to comment
Share on other sites

Thank s that did it :D

 

Now I have new problem.

 

I run a test and put the start date 06.01.2006 clock 15.25 and end date to 10.01.2006 clock 15.30

The Happy Hour box don t show anymore after 06.01.2006 clock 15.30? ;)

 

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...