Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Open Featured Sets Support


surfalot

Recommended Posts

Ive got it all installed, great its all commented well.

 

Im a bit unsure exactly how to use it. How do you display featured a manufacturer or category? Or featured products only by one manufacturer or from one category? At the moment I can only seam to choose where to display featured products.

if you installed the code in /admin/categories.php, you should have little red/green buttons in your admin's manufaturer list, product list, category list. just select the ones you want feature. using those buttons adds the default number of days to feature them. If you don't want the featured period to expire there is a setting in the admin for that. Beside the red/green buttons, you should also have new edit fields on the edit pages for each of these manufaturer, product and category.

Link to comment
Share on other sites

  • Replies 249
  • Created
  • Last Reply

Top Posters In This Topic

if you installed the code in /admin/categories.php, you should have little red/green buttons in your admin's manufaturer list, product list, category list. just select the ones you want feature. using those buttons adds the default number of days to feature them. If you don't want the featured period to expire there is a setting in the admin for that. Beside the red/green buttons, you should also have new edit fields on the edit pages for each of these manufaturer, product and category.

 

Aaaaah cool, thanks it was the date thing that confused me.

Link to comment
Share on other sites

pyyh - got it to work. Now I have one table color in my center boxes - and another for all boxes displayed in the left/right columns.

 

 

changed

new infoBox($info_box_contents);

 

to

new contentBox($info_box_contents);

 

in all the modules/featured....php files

 

In the classes/boxes.php file I have changed to at line 137

$this->table_parameters = 'class="infoBoxTable"';

 

and at line 143 changed to

$this->table_parameters = 'class="infoBoxContentsTable"';

 

At line 80 and line 86 there are also style definitions - leave them alone!

 

In my stylesheest I have made this, basically just a copy of infoBox and infoBoxContents:

 

.infoBoxTable {

background: #A8BADA;

}

 

.infoBoxContentsTable {

background: White;

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

 

This way it works if you like another color in boxes that are not shown in left/right columns

 

Helle

Link to comment
Share on other sites

I cant get it to display anything but 6 featured products on the categories pages. Under 'Display featured products' setting 'Featured products maximum' doesn’t seam to work although what I set it to remains there.

 

Have I missed a bit of code somewhere?

 

Can I hard code it somewhere as once set Im unlickly to want to change it?

Edited by Caios
Link to comment
Share on other sites

I cant get it to display anything but 6 featured products on the categories pages. Under 'Display featured products' setting 'Featured products maximum' doesn’t seam to work although what I set it to remains there.

 

Have I missed a bit of code somewhere?

 

Can I hard code it somewhere as once set Im unlickly to want to change it?

I just tested that on my test installation and it works fine. I set 9 products to be featured and set the maximum to 9 products. And 9 featured products are displayed. Make sure you have not entered the SQL twice on your database. (scroll down to the bottom of your list of admin options and make sure)

Also understand there is an option that limits the items to display based on what category you are in.

Link to comment
Share on other sites

pyyh - got it to work. Now I have one table color in my center boxes - and another for all boxes displayed in the left/right columns.

great! your center shadow looks real nice.

Link to comment
Share on other sites

  • 2 months later...

Love this contribution! Exactly what we were looking for!

 

The admin features are impressive indeed.

 

The contribution functions with no problems. I just have some questions in regard to styling.

 

I am using layout 4 /style 3 with the gbox grouping method. I need to figure out how to format it to look like my category listings shown below. All I really need is to add my boarder gif files, a dashed seperator gif, and and my details button.

 

As of right now it looks like this:

 

eww.gif

 

What I'm going for:

 

desiredlook.gif

 

Tough to do?

 

-Dano

Link to comment
Share on other sites

Love this contribution! Exactly what we were looking for!

 

The admin features are impressive indeed.

 

The contribution functions with no problems. I just have some questions in regard to styling.

 

I am using layout 4 /style 3 with the gbox grouping method. I need to figure out how to format it to look like my category listings shown below. All I really need is to add my boarder gif files, a dashed seperator gif, and and my details button.

 

As of right now it looks like this:

 

eww.gif

 

What I'm going for:

 

desiredlook.gif

 

Tough to do?

 

-Dano

 

with those settings, and if you are talking about "product" features, you can modify the look in the file includes/modules/featured_gbox_products.php

 

the code you are looking for is this set:

 

	if ((FEATURED_SET == '4') && (FEATURED_SET_STYLE == '3')) {
  $info_box_contents[0]['text'] .= '<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>';
  $info_box_contents[0]['text'] .= '<td style="height: '.FEATURED_VLINE_IMAGE_HEIGHT.'px;"><table border="0" cellspacing="0" cellpadding="'.FEATURED_CELLPADDING.'" width="100%"><tr><td align="center" valign="top" class="featuredProducts"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $featured_products_array[$i]['image'], $featured_products_array[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br>' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5');
  $info_box_contents[0]['text'] .= '<br><div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . $featured_products_array[$i]['name'] . '</a></div>' . OPEN_FEATURED_TABLE_HEADING_PRICE . $products_price . '' . $buy_now_link . '</td></tr></table></td>';
  $info_box_contents[0]['text'] .= (((FEATURED_PRODUCTS_COLUMNS>1)&&(($col/$num_columns)!=floor($col/$num_columns)) && (($i+1) != sizeof($featured_products_array)))?'<td align="center" width="'.FEATURED_LINE_THICKNESS.'" style="height: '.FEATURED_VLINE_IMAGE_HEIGHT.'px;"><div style="background-color: #'.FEATURED_LINE_COLOR.'; height: '.FEATURED_VLINE_IMAGE_HEIGHT.'px; width: '.FEATURED_LINE_THICKNESS.'px;">' . tep_image(DIR_WS_IMAGES . ('pixel_trans.gif'), '', FEATURED_LINE_THICKNESS, FEATURED_VLINE_IMAGE_HEIGHT) . '</div></td>':'');
  $info_box_contents[0]['text'] .= '</tr></table>';
}

 

that code represents 1 product, so you can setup your look there.

 

hope that helps.

Link to comment
Share on other sites

I'm trying to make this work with the lastest STS v4.5

 

It functions. I can select products/category/manufactuers to feature and they appear on the front end. The problem being the styling of the box.

 

I am not getting any response to changes via admin. Even if I disable STS via admin.

 

What files communicate the styling configurations in admin to the front end?

 

I'm going to keep working with beyond compare and see if I can spot anything fishy.

 

-Dano

Link to comment
Share on other sites

Update: I simply had to select individual products. I selected whole categories and did not configure the style and layout of the 'Featured Categories".

 

Primo Contribution!

Link to comment
Share on other sites

  • 4 months later...

A problem reported by jack_mcs. If you are experiencing a problem with the Buy Now links putting the wrong product into the cart. do this fix...

 

in the module files:

/includes/modules/featured_gbox_categories.php

/includes/modules/featured_gbox_manufacturer.php

/includes/modules/featured_gbox_products.php

/includes/modules/featured_sbox_categories.php

/includes/modules/featured_sbox_manufacturer.php

/includes/modules/featured_sbox_products.php

 

find:

$buy_now_link = '
<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>';

replace with:

$buy_now_link = '
<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action','products_id')) . 'action=buy_now&products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>';

Link to comment
Share on other sites

  • 4 weeks later...

i have Featured Set installed on a number of OSC stores i've built. since hosts have started upgrading to SQL5, the contribution has stopped working. i can attribute it to the contribution because if i turn it off, the errors go away and the stores revert back to "new products for..." box working fine.

 

here's the error i get:

 

1054 - Unknown column 'p.products_id' in 'on clause'

select c.categories_id, c.categories_image, c.parent_id, c.categories_featured_until, cd.categories_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, pd.products_short, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from categories c, categories_description cd, products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '1' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' order by rand() DESC limit 6

[TEP STOP]

 

i've tried the latest update by xantian15 dated 12.30.2006 but still see the errors. could anyone help please?!

Link to comment
Share on other sites

  • 1 month later...

HELP! I installed this OFS V1.14. Everything works fine; however, when I click on the green button on the Category, it will not activate or turn green. Anyone can help me solve this headache would be greatly appreciated!

Link to comment
Share on other sites

  • 4 weeks later...

featured products are not displaying category names? any ideas what could be the probem? i only see 'featured' at infoboxheader. same thing is happening with featured categories, i only see 'featured' at the top

Edited by yaoi
Link to comment
Share on other sites

  • 4 weeks later...

I just uploaded an updated /includes/modules/featured_sets.php to hopefully help others with mySQL 5 compatibility. I found the basic ideas for it in the forum for Wolfen Featured Sets, which is the base from witch this contrib came from.

 

If it works for you great, if not try looking in the wolfen featured sets forum.

 

Sean

Link to comment
Share on other sites

  • 2 weeks later...

Hi surfalot,

 

I installed your contribution and it works simply marvelous ;)

 

I am working on a very small tool that let's you search for a product, then you can go to the next page to quickly edit it. Although I haven't really started on the update-product part, it works great. Only small problem I have is to insert the calendar for 'featured until date available' (I get a small javascript error), and was wondering if you could take a quick look?

 

Here is the code (it can easily be tested by putting it in /admin and entering ?pID=x after the url - x being a product id):

<?php
 require('includes/application_top.php');
 require('includes/languages/product_list.php');
 require('includes/languages/english/categories.php');

if (isset($HTTP_GET_VARS['pID'])) $HTTP_GET_VARS['pID'] = $pID;

$product_query = tep_db_query("select p.products_id, p.products_model, pd.products_name, pd.products_description, p.products_briefdesc, p.products_condition, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_featured, p.products_featured_until from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $pID . "' and p.products_id = pd.products_id");

   if ($product['products_status'] = '0') $pInfo->products_status = '1';
   switch ($pInfo->products_status) {
     case '0': $in_status = false; $out_status = true; break;
     case '1':
     default: $in_status = true; $out_status = false;
   }
  if (empty($pInfo->products_featured)) $pInfo->products_featured = '0';
   switch ($pInfo->products_featured) {
     case '0': $in_f_status = false; $out_f_status = true; break;
     case '1':
     default: $in_f_status = true; $out_f_status = false;
   }

 if($_REQUEST['update']=="update")
 {
  while($product1 = tep_db_fetch_array($product_query))
		{

		$str=tep_db_query("update products set products_price='".$_REQUEST['price_'.$product1['products_id']]."',products_weight='".$_REQUEST['weight_'.$product1['products_id']]."', products_quantity='".$_REQUEST['qty_'.$product1['products_id']]."' where products_id='".$product1[products_id]."'");

		}
		header("location:product_list.php?Update=Success&prod_search=".$_REQUEST['prod_search']);

 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">
<script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>
<script language="JavaScript"><!-- 
 var ProductsFeaturedUntil = new ctlSpiffyCalendarBox("ProductsFeaturedUntil", "new_product", "products_featured_until","btnDate1","<?php echo $pInfo->products_featured_until; ?>", scBTNMODE_CUSTOMBLUE);
//--></script>
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
<div id="spiffycalendar" class="text"></div>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<?php while($product = tep_db_fetch_array($product_query))
     {
?>
<td valign="top">
		<table border="0" width="100%" cellspacing="0" cellpadding="0">
			<tr>					
				<td class="pageHeading">Edit Product (<?php echo $pID;?>)</td>
                      </tr>

     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main">Products Status:</td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_radio_field('products_status', '1', $in_status) . ' ' . TEXT_PRODUCT_AVAILABLE . ' ' . tep_draw_radio_field('products_status', '0', $out_status) . ' ' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td>
         </tr>
         <tr>
           <td class="main">Featured Product:</td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_radio_field('products_featured', '1', $in_f_status) . ' ' . TEXT_PRODUCT_YES . ' ' . tep_draw_radio_field('products_featured', '0', $out_f_status) . ' ' . TEXT_PRODUCT_NO; ?></td>
         </tr>
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
         <tr>
           <td class="main">Featured Until Date Available:<br><small>(YYYY-MM-DD)</small></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '; ?><script language="javascript">ProductsFeaturedUntil.writeControl(); ProductsFeaturedUntil.dateFormat="yyyy-MM-dd";</script></td>
         </tr>
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
         <tr>
           <td class="main">Products Name:</td>
           <td  class="main"><input type="text" name="name_<?php echo $product['products_id'];?>" id="name" value="<?php echo $product['products_name'];?>" size="100"></td>
         </tr>
         <tr bgcolor="#ebebff">
           <td class="main">Products Price:</td>
           <td  class="main" align="left"><input type="text" name="price_<?php echo $product['products_id'];?>" id="price" value="<?php echo $product['products_price'];?>" size="10"></td>
         </tr>
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
         <tr>
           <td class="main" valign="top">Products Description:</td>
           <td><table border="0" cellspacing="0" cellpadding="0">
             <tr>
             <td  class="main"><textarea name="description_<?php echo $product['products_id'];?>" rows="60" cols="150" id="description"><?php echo $product['products_description'];?></textarea></td>
             </tr>
           </table></td>
         </tr>
          </tr>
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
         <tr>
           <td class="main">Products Quantity:</td>
           <td class="main"><input type="text" name="qty_<?php echo $product['products_id'];?>" id="qty" value="<?php echo $product['products_quantity'];?>" size="10"></td>
         </tr>
         <tr>
   <td class="main">Products Brief Description:</td>
   <td  class="main"><input type="text" name="briefdesc_<?php echo $product['products_id'];?>" id="briefdesc" value="<?php echo $product['products_briefdesc'];?>" size="100"></td>
         </tr>
         <tr>
   <td class="main">Products Condition:</td>
   <td  class="main"><input type="text" name="condition_<?php echo $product['products_id'];?>" id="condition" value="<?php echo $product['products_condition'];?>" size="10"></td>
         </tr>
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>  
         <tr>
           <td class="main">Products Model:</td>
           <td  class="main"><input type="text" name="model_<?php echo $product['products_id'];?>" id="model" value="<?php echo $product['products_model'];?>" size="30"></td>
         </tr>
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>        
                   <tr>
           <td class="main">Change Products Image (Without Uploading):</td>
           <td  class="main"><input type="text" name="image_<?php echo $product['products_id'];?>" id="image" value="<?php echo $product['products_image'];?>" size="30"></td>
            </td>
         </tr>         
         <tr>
           <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
       </table></td>
     </tr>
   </table>
			 </td>
			  </tr>
			</table>
		</td>
	</tr>
</table>
<?php 
}
?>
<!-- body_text //-->
<?php
			if($_REQUEST['Update']=="Success")
			{
			?>
			<tr><td><font color="#FF3333">Record has been updated successfully</font></td></tr>
			<?php
			}	
			?>
						<tr>
							<td class="dataTableContent">
							<input type="hidden" name="prod_search" value="<?php echo $_REQUEST['prod_search']; ?>"><input type="submit" name="update" value="update">
							</td>
						</tr>
						</table>
						</form>
				 </td>
			  </tr>
			</table>
		</td>
	</tr>
</table>
<!-- body_text_eof //-->
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

I have used this contribution and love it. Now, I have rebuilt my site from scratch after scouring the contribs for all the features I want available in my store. My question is this ..... has anyone successfully installed this contrib with Matching Products Crosssell ( http://www.oscommerce.com/community/contributions,5347)??? If so, how? My main problem is the merging of the queries used by both contribs, as they both modify the same ones. This is the final contrib I need to plug-in. Any help would be greatly appreciated.

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