If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Sideboxes / I want to talk to some coders about an Idea I have for a new mod

I want to talk to some coders about an Idea I have for a new mod

Locked

Started by wtashby on 16 Aug 2008, 6:10 AM · Views: 2,135

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
16 Aug 2008, 6:10 AM
#1
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Post #1 by wtashby

I'm not a coder, and I don't know much about php, other than locating and fixing what I'm told to.:blush:

I was wondering if anyone with coding skill might be interested in building a new mod. A "Random Daily Specials" mod. It would pull a product from the database, put it into a nice side box, give it a pre-determined discount (same discount every day, set in admin), and then, also have a nifty countdown clock showing how much time is left for that special. The Begin date and End date, time in hours, minutes, and seconds.

Here is an Example.

There is a mod very similar to this in the other carts contributions, that might possibly be ported???:lookaroun

I would love to hear some feedback on this. See if there is any interest, Especially from some adventurous coder that might be up to the challange?!?:flex::flex:

It would be REALLY cool to have a Specials mod with a Set It and Forget It feature. Don't you think?:cool:

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

21 Aug 2008, 11:02 AM
#2
sunflowertami avatar

sunflowertami

Zen Follower

Join Date:
Jun 2008
Posts:
267
Plugin Contributions:
0

Post #2 by sunflowertami

I think that's a great idea! I'm not a coder either but I was looking for something that shows a product at random, I was thinking of naming it SURPRISE ME! but your idea is better to offer a discount for that hour. Would make the customer come back to check if their favorite product is going to be listed!

21 Aug 2008, 2:32 PM
#3
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Post #3 by clydejones

sunflowertami:

I think that's a great idea! I'm not a coder either but I was looking for something that shows a product at random, I was thinking of naming it SURPRISE ME! but your idea is better to offer a discount for that hour. Would make the customer come back to check if their favorite product is going to be listed!

The Mystery Sidebox might get you started

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

22 Aug 2008, 2:05 AM
#4
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Post #4 by wtashby

clydejones:

The Mystery Sidebox might get you started

Well, that's an interesting mod, but it doesn't do what I'm asking about. Not even close, no way, no how. That's a horse of a different color.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

22 Aug 2008, 2:12 AM
#5
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Post #5 by clydejones

wtashby:

Well, that's an interesting mod, but it doesn't do what I'm asking about. Not even close, no way, no how. That's a horse of a different color.

I know, my post was directed to sunflowertami who wanted a "surprise me" sidebox.

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

22 Aug 2008, 2:21 AM
#6
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Post #6 by wtashby

:oops:
My Bad! Sorry.
Still a neat little mod though.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

22 Aug 2008, 3:07 AM
#7
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Post #7 by wtashby

I'll go one even better. Here's the code to a mode that Does do what I think I want.

<?php
/*
  $Id: specials.php,v 1.31 2003/06/09 22:21:03 hpdl Exp $

   by by Infobroker, Germany

  $Id: happy_hours_specials_basic.php,v 2.02 2005/09/25 ep Exp $
 
  Erich Paeper - [email protected]

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
	$date = date ('Y-m-d');
	$time = date ('H:i:s');
	
  if ($random_product = tep_random_select("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, hhs.specials_price_happy_hours, hhs.status_happy_hours, hhs.happy_hours_beginning_date, hhs.happy_hours_end_date, hhs.happy_hours_beginning_time, hhs.happy_hours_end_time, hhs.specials_date_added from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_HAPPY_HOURS_SPECIALS_BASIC . " hhs where p.products_status = '1' and p.products_id = hhs.products_id and pd.products_id = hhs.products_id and pd.language_id = '" . (int)$languages_id . "' and hhs.status_happy_hours = '1' and '" . $time . "' BETWEEN hhs.happy_hours_beginning_time and hhs.happy_hours_end_time and hhs.happy_hours_beginning_date <= '". $date ."' and '". $date ."' <= hhs.happy_hours_end_date order by hhs.specials_date_added desc limit " . MAX_RANDOM_SELECT_SPECIALS)) {

?>
<!-- happy_hours_specials_basic //-->
          <tr>
            <td>
<?php
	$uhrzeitbis = substr($random_product['happy_hours_end_time'],'', 5);
    $info_box_contents = array();
    $info_box_contents[] = array('text' => BOX_HEADING_HAPPY_HOURS);

    new infoBoxHeading($info_box_contents, false, false);
    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'center',
                                 'text' => BOX_TEXT_HAPPY_HOURS1 . $uhrzeitbis . BOX_TEXT_HAPPY_HOURS2 . '<br><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br><s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_price_happy_hours'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>');

    new infoBox($info_box_contents);
	
?>
            </td>
          </tr>
<!-- happy_hours_specials_basic_eof //-->
<?php
  }
?>

It just needs to be ported. In OSC, it supposed to go in (catalog)/includes/boxes/happy_hours_specials_basic.php

Don't know Where in Zencart. Here's the link to what it supposed to look like - LINK

Now, any one want to pick up the gauntlet?:flex:

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

22 Aug 2008, 3:42 AM
#8
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Post #8 by wtashby

I've attached another one that has 2 files and an sql, but still looks fairly simple for a seasoned coder. This one has more functionality, and allows for better control, supposedly.

Along with getting a couple of decent mods for everyone out of this, I'm also hoping to be able to do a side by side comparison so that I can learn some basics in porting OSC mods for future reference.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020

27 Aug 2008, 12:07 AM
#9
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Post #9 by wtashby

Aren't there any coders out there up for the challenge of porting this tiny mod over to Zencart? It would be a really cool mod for everyone.

I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses
using version 1.5.7-06232020