Jump to content
Sign in to follow this  
sgflowers

family 3.0 problems

Recommended Posts

Way to go Chris, that looks so great....look forward to trying it out.

 

Kel


I live in my own little world. But it's OK. They know me here.

Share this post


Link to post
Share on other sites

Thanks for your ideas, Chris, acutally I had families set up before I installed 3.3 with version 2 and they are still there, just not showing up in the actual catalog. In 3.3 I set up families in the administration interface and still nothing. I did a dumb thing too, didn't realize that I had to back up through the admin. file, I just downloaded the 'catalog' folder to my hard drive and figured that was good, so I can't go back to the previous sql file that was working fine, just couldnl't set up several families per product.

Now, for another question, when the installation file says "paste the following text at the "end" of the file..." it means before the <? yes? or is it really at the whole end after the php appears to be closed. If this doesn't make sense, I'm sorry. I'm so totally new to php that it intimidates me a bit. I was real cocky at first when the first version worked great, now my tail is between my legs .

Share this post


Link to post
Share on other sites

I don't know if it's been done yet, but here is a quick mod

 

in admin/includes/functions/database.php

 

find this function

function tep_remove_family($family_id)

 

and after line

tep_db_query("delete from " . TABLE_FAMILIES . " where family_id = '" . (int)$family_id . "'");

 

add this line:

 

tep_db_query("delete from " . TABLE_PRODUCTS_FAMILIES . " where family_id = '" . (int)$family_id . "'");

 

This will get rid of the product assosiations of the family that we are deleting.

Share this post


Link to post
Share on other sites

Hi there; Fam Prod 3.3 is working well; but I was wondering if you could give some advice on configuring the families.

 

The bottom line question is: Is there a way to keep the family products from showing on certain items within the family? I tried lowering the number in Admin>Config>New Products but it made no difference.

 

If you want more detail here's the overall goal:

Chess Pieces: show all available boards that are the right size for only that set of pieces

Chess Sets: show no accessories

Chess Boards: show no accessories OR just pieces.

 

Here's the problem.

Chess Boards are showing every piece listed with every board.

 

The Familes are configured so that each and every Chess Piece has their own family. Here's how the Families are configured:

Chess Piece A: Boards 1,2,3.4

Chess Piece B: Boards 5,6,7

Chess Piece C: Boards 1,2,3,4

etc

 

I didn't make just "Small Pieces" and "Large Pieces" because I didn't want every small piece to be displayed on every small piece's page.

 

Can you see a way to further organize the Families to keep the boards from showing up on the Chess Boards pages? Or, just turn them off for the Chess Boards category?

 

Clear as mud?!

Share this post


Link to post
Share on other sites

Hi

I have this installed and functioning correctly BUT there is no way to alter families once they are saved?

Only way is to delete the family and start again!

Share this post


Link to post
Share on other sites

im having this wierd problem when i press "assign families" it just shows up blank. Have no clue what this is, any suggestions?

Share this post


Link to post
Share on other sites

Hi there I installed the latest version of this contribution (posted on April 8th, 2006) and got it installed ok, but it hasn't changed anything anywhere except in admin. I created a family, and added some things to it and went to one of them on my site and it's identical to the way it was before I installed this contribution. Looking through this thread I realize we haven't heard anything from Chris in two years, so I'm not hopeful for a solution, I just thought I would post this in case anyone else has or has had this problem and knows how to fix it. In the mean time I am going to look for another contribution that will do approximately the same thing. :blush:

Share this post


Link to post
Share on other sites

I have a small problem,

 

On a fresh install ...

 

I follow the instructions, all goes well... I can assign products to a family and they display under the product, but when I go to "View Families" and click on one of the families, it does not display the list of items ?

 

Is it meant to do this ?

 

How do I track items in families ?

 

Any help would be great!!!

Share this post


Link to post
Share on other sites

hi guys i have this problem in my database :

 

"Error

SQL query:

 

SELECT *

FROM

WHERE CONCAT_WS( "-", 16, 'Family Products', 'The options for the Family Products v3.4', 16, 1 ) = "16"

ORDER BY 16 , 'Family Products', 'The options for the Family Products v3.4', 16, 1

 

MySQL said:

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE CONCAT_WS("-", 16, 'Family Products', 'The options for the Family Produc' at line 3 "

 

how i can resolve this

 

best regards

Share this post


Link to post
Share on other sites
im having this wierd problem when i press "assign families" it just shows up blank. Have no clue what this is, any suggestions?

 

 

check in admin/assign_families.php

there is an extra echo in line 96 i think

just remove the extra echo

 

from

echo " " . tep_get_product_list('prod_selected10') . '<br>';

echo

?></td></tr>

 

to

echo " " . tep_get_product_list('prod_selected10') . '<br>';

?></td></tr>

 

problem arised because the echo line has no " " and ;

hope this helps

Share this post


Link to post
Share on other sites
hi guys, i have a problem in select display appears blank, how i can fix this?

 

thanks

 

hey ricardo

i'm not too sure about the porblem u facing

but could u like restart yr apache and everything else

and also dont forgetto check your settings

 

so does it only happen in select display ?

u r using version?3.4?if nto try using 3.4

Share this post


Link to post
Share on other sites
I don't have SEF URLs turned on and it still doesn't show any family products - it is blank. So I put my backup copy back on (catalog with family_products 2....) cause I really don't have time to mess with this right now, and it still doesn't show any.

Any idea where the problem might be? This is family_products_3_3 that I'm trying to work with.

 

 

Did you manage to solve this? I am having the same problem, no error messages, products are added and stored in their family in admin perfectly but they are not displayed in catalog (product_info). :huh:

 

Any helps/suggestions would be greatly appreciated.

 

Thanks, David.

Share this post


Link to post
Share on other sites

Hi,

 

I haven't had any problems getting this to work, but i do have a problem in that the 'box' way to display the related products appears without a header to say 'Related Products....'.

I added a table above the code in modules/family_products but now the header appears on every page.

Anyone know a way to get this so it displays only on the product pages that have the family products associated???

 

Here's the code

<!-- family_products //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr> <td background=images/m34.gif style="padding-left: 23px" colspan=3><span class=ch2>Customers Who Viewed This Item Also Viewed These</span></td></tr></table>
<?php
//This is where the code for the infoBox starts:

if ((FAMILY_DISPLAY_TYPE == 'Box') && (FAMILY_DISPLAY_FORMAT == 'Seperate')){

$family_name_query = tep_db_query("select pf.family_id, f.family_name from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_FAMILIES . " f where pf.family_id = f.family_id and pf.products_id = '" . $products_id . "'");
while ($family_results = tep_db_fetch_array($family_name_query)) {


$family_query = tep_db_query("select distinct p.manufacturers_id, p.products_id, p.products_image, p.products_tax_class_id, p.products_price, s.specials_new_products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pf.family_id = '" . (int)$family_results['family_id'] . "' and p.products_id = pf.products_id and p.products_id != '" . $products_id . "'" . $where_clause2 . " order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);



$info_box_contents = array();

if (FAMILY_HEADER_FORMAT == 'Family Name') {
$info_box_contents[] = array('text' => $family_results['family_name']);
} else {
if (FAMILY_HEADER_TEXT == '') {
$info_box_contents[] = array('text' => TABLE_HEADING_FAMILY_PRODUCTS);
} else {
$info_box_contents[] = array('text' => FAMILY_HEADER_TEXT);
}
}

$family_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pf.family_id = '" . (int)$family_results['family_id'] . "' and p.products_id = pf.products_id and p.products_id != '" . $products_id . "'" . $where_clause2 . " order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

if (tep_db_num_rows($family_query) > 0) {
new contentBoxHeading($info_box_contents);


$row = 0;
$col = 0;
$info_box_contents = array();
$where_clause2 = '';
while ($family = tep_db_fetch_array($family_query)) {
$where_clause2 .= " and p.products_id != '" . $family['products_id'] . "'";
  $family['products_name'] = tep_get_products_name($family['products_id']);
$info_box_contents[$row][$col] = array('align' => 'center',
									  'params' => 'class="smallText" width="33%" valign="top"',
									  'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $family['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $family['products_image'], $family['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $family['products_id']) . '">' . $family['products_name'] . '</a><br>' . $currencies->display_price($family['products_price'], tep_get_tax_rate($family['products_tax_class_id'])));

  $col ++;
  if ($col > 2) {
 $col = 0;
 $row ++;
  }
}

new contentBox($info_box_contents);
echo '<p>';
}
}
}


if ((FAMILY_DISPLAY_TYPE == 'Box') && (FAMILY_DISPLAY_FORMAT == 'Random')){

$family_name_query = tep_db_query("select family_id from " . TABLE_PRODUCTS_FAMILIES . " where products_id = '" . $products_id . "'");
if (tep_db_num_rows($family_name_query) > '0') {

$info_box_contents = array();
if (FAMILY_HEADER_TEXT == '') {
$info_box_contents[] = array('text' => TABLE_HEADING_FAMILY_PRODUCTS);
} else {
$info_box_contents[] = array('text' => FAMILY_HEADER_TEXT);
}
$family_name_num_rows = tep_db_num_rows($family_name_query);
$num_of_rows_less_one = $family_name_num_rows - '1';

if (tep_db_num_rows($family_name_query) == '1') {
$family_results = tep_db_fetch_array($family_name_query);
$family_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pf.family_id = '" . (int)$family_results['family_id'] . "' and p.products_id = pf.products_id and p.products_id != '" . $products_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
} else {
$where_clause = '';
for ($i=0; $i < tep_db_num_rows($family_name_query); $i++) {
$family_results = tep_db_fetch_array($family_name_query);
if ($i < $num_of_rows_less_one) {
$where_clause .= "(pf.family_id = '" . $family_results['family_id'] . "') OR ";
} else {
$where_clause .= "(pf.family_id = '" . $family_results['family_id'] . "')";
}
}
$family_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and (" . $where_clause . ") and p.products_id = pf.products_id and p.products_id != '" . $products_id . "' limit " . MAX_DISPLAY_NEW_PRODUCTS);
}

if (tep_db_num_rows($family_query) > 0) {
new contentBoxHeading($info_box_contents);


$row = 0;
$col = 0;
$info_box_contents = array();
$where_clause2 = '';	
  for ($i=0, $j=1; ($i < MAX_DISPLAY_NEW_PRODUCTS) && ($i < tep_db_num_rows($family_query)); $i++, $j++) {
if (tep_db_num_rows($family_name_query) == '1') {
  $family = tep_random_select("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = pf.products_id and p.products_id != '" . $products_id . "'" . $where_clause2);
} else {
  $family = tep_random_select("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and (" . $where_clause . ") and p.products_id = pf.products_id and p.products_id != '" . $products_id . "'" . $where_clause2);
}
$where_clause2 .= " and p.products_id != '" . $family['products_id'] . "'";


  $family['products_name'] = tep_get_products_name($family['products_id']);
$info_box_contents[$row][$col] = array('align' => 'center',
									  'params' => 'class="smallText" width="33%" valign="top"',
									  'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $family['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $family['products_image'], $family['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $family['products_id']) . '">' . $family['products_name'] . '</a><br>' . $currencies->display_price($family['products_price'], tep_get_tax_rate($family['products_tax_class_id'])));

  $col ++;
  if ($col > 2) {
 $col = 0;
 $row ++;
  }
}

new contentBox($info_box_contents);
echo '<p>';
}
}
}
?>
<?php

//This is where the code for the list starts:
if ((FAMILY_DISPLAY_TYPE == 'List') && (FAMILY_DISPLAY_FORMAT == 'Seperate')){

$family_name_query = tep_db_query("select pf.family_id, f.family_name from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_FAMILIES . " f where pf.family_id = f.family_id and pf.products_id = '" . $products_id . "'");
while ($family_results = tep_db_fetch_array($family_name_query)) {

$family_query = tep_db_query("select distinct p.manufacturers_id, p.products_id, p.products_image, p.products_tax_class_id, p.products_price, s.specials_new_products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pf.family_id = '" . (int)$family_results['family_id'] . "' and p.products_id = pf.products_id and p.products_id != '" . $products_id . "'" . $where_clause2 . " order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

  $define_list = array('PRODUCT_LIST_NAME' => '2',//PRODUCT_LIST_NAME,
					'PRODUCT_LIST_PRICE' => '3',//PRODUCT_LIST_PRICE,
					'PRODUCT_LIST_IMAGE' => '1',//PRODUCT_LIST_IMAGE,
					'PRODUCT_LIST_BUY_NOW' => '4');//PRODUCT_LIST_BUY_NOW);

  asort($define_list);

  $column_list = array();
  reset($define_list);
  while (list($key, $value) = each($define_list)) {
 if ($value > 0) $column_list[] = $key;
  }

$list_box_contents = array();
if (tep_db_num_rows($family_query) > 0) {

if (FAMILY_HEADER_FORMAT == 'Family Name') {
  $list_box_contents[0][0] = array('align' => 'left',
							  'params' => 'class="productListing-heading"',
							  'text' => ' ' . $family_results['family_name'] . ' ');
} else {
if (FAMILY_HEADER_TEXT == '') {
  $list_box_contents[0][0] = array('align' => 'left',
							  'params' => 'class="productListing-heading"',
							  'text' => ' ' . TABLE_HEADING_FAMILY_PRODUCTS . ' ');
} else {
 $list_box_contents[0][0] = array('align' => 'left',
							  'params' => 'class="productListing-heading"',
							  'text' => ' ' . FAMILY_HEADER_TEXT . ' ');
}
}

for($i=1; $i<4; $i++) {
  $list_box_contents[0][$i] = array('align' => 'left',
							  'params' => 'class="productListing-heading"',
							  'text' => ' ');
}
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  switch ($column_list[$col]) {
 case 'PRODUCT_LIST_NAME':
   $lc_text = TABLE_HEADING_PRODUCTS;
   $lc_align = '';
   break;
 case 'PRODUCT_LIST_PRICE':
   $lc_text = TABLE_HEADING_PRICE;
   $lc_align = 'right';
   break;
 case 'PRODUCT_LIST_IMAGE':
   $lc_text = TABLE_HEADING_IMAGE;
   $lc_align = 'center';
   break;
 case 'PRODUCT_LIST_BUY_NOW':
   $lc_text = TABLE_HEADING_BUY_NOW;
   $lc_align = 'center';
   break;
  }

  if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
 $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
  }

  $list_box_contents[1][] = array('align' => $lc_align,
							   'params' => 'class="productListing-heading"',
							   'text' => ' ' . $lc_text . ' ');
}
  $rows = 0;

$where_clause2 = '';
  while ($listing = tep_db_fetch_array($family_query)) {
$where_clause2 .= " and p.products_id != '" . $listing['products_id'] . "'";
  $listing['products_name'] = tep_get_products_name($listing['products_id']);
 $rows++;

 if (($rows/2) == floor($rows/2)) {
   $list_box_contents[] = array('params' => 'class="productListing-even"');
 } else {
   $list_box_contents[] = array('params' => 'class="productListing-odd"');
 }

 $cur_row = sizeof($list_box_contents) - 1;

 for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
   $lc_align = '';

   switch ($column_list[$col]) {
	 case 'PRODUCT_LIST_NAME':
	   $lc_align = '';
	   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		 $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
	   } else {
		 $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';
	   }
	   break;
	 case 'PRODUCT_LIST_PRICE':
	   $lc_align = 'right';
	   if (tep_not_null($listing['specials_new_products_price'])) {
		 $lc_text = ' <s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
	   } else {
		 $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
	   }
	   break;
	 case 'PRODUCT_LIST_IMAGE':
	   $lc_align = 'center';
	   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		 $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
	   } else {
		 $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
	   }
	   break;
	 case 'PRODUCT_LIST_BUY_NOW':
	   $lc_align = 'center';
	   $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
	   break;
   }

   $list_box_contents[$cur_row][] = array('align' => $lc_align,
										  'params' => 'class="productListing-data"',
										  'text'  => $lc_text);
 }
  }

  new productListingBox($list_box_contents);
}
echo '<p>';
}
}


if ((FAMILY_DISPLAY_TYPE == 'List') && (FAMILY_DISPLAY_FORMAT == 'Random')) {
$family_name_query = tep_db_query("select family_id from " . TABLE_PRODUCTS_FAMILIES . " where products_id = '" . $products_id . "'");
if (tep_db_num_rows($family_name_query) > '0') {

$family_name_num_rows = tep_db_num_rows($family_name_query);
$num_of_rows_less_one = $family_name_num_rows - '1';

if (tep_db_num_rows($family_name_query) == '1') {
$family_results = tep_db_fetch_array($family_name_query);
$family_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pf.family_id = '" . (int)$family_results['family_id'] . "' and p.products_id = pf.products_id and p.products_id != '" . $products_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
} else {
$where_clause = '';
$where_clause2 = '';
for ($i=0; $i < tep_db_num_rows($family_name_query); $i++) {
$family_results = tep_db_fetch_array($family_name_query);
if ($i < $num_of_rows_less_one) {
$where_clause .= "(pf.family_id = '" . $family_results['family_id'] . "') OR ";
} else {
$where_clause .= "(pf.family_id = '" . $family_results['family_id'] . "')";
}
}
$family_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_FAMILIES . " pf, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and (" . $where_clause . ") and p.products_id = pf.products_id and p.products_id != '" . $products_id . "' limit " . MAX_DISPLAY_NEW_PRODUCTS);
}

  $define_list = array('PRODUCT_LIST_NAME' => '2',//PRODUCT_LIST_NAME,
					'PRODUCT_LIST_PRICE' => '3',//PRODUCT_LIST_PRICE,
					'PRODUCT_LIST_IMAGE' => '1',//PRODUCT_LIST_IMAGE,
					'PRODUCT_LIST_BUY_NOW' => '4');//PRODUCT_LIST_BUY_NOW);

  asort($define_list);

  $column_list = array();
  reset($define_list);
  while (list($key, $value) = each($define_list)) {
 if ($value > 0) $column_list[] = $key;
  }

$list_box_contents = array();
if (tep_db_num_rows($family_query) > 0) {

if (FAMILY_HEADER_TEXT == '') {
  $list_box_contents[0][0] = array('align' => 'left',
							  'params' => 'class="productListing-heading"',
							  'text' => ' ' . TABLE_HEADING_FAMILY_PRODUCTS . ' ');
} else {
 $list_box_contents[0][0] = array('align' => 'left',
							  'params' => 'class="productListing-heading"',
							  'text' => ' ' . FAMILY_HEADER_TEXT . ' ');
}

for($i=1; $i<5; $i++) {
  $list_box_contents[0][$i] = array('align' => 'left',
							  'params' => 'class="productListing-heading"',
							  'text' => ' ');
}
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  switch ($column_list[$col]) {
 case 'PRODUCT_LIST_NAME':
   $lc_text = TABLE_HEADING_PRODUCTS;
   $lc_align = '';
   break;
 case 'PRODUCT_LIST_PRICE':
   $lc_text = TABLE_HEADING_PRICE;
   $lc_align = 'right';
   break;
 case 'PRODUCT_LIST_IMAGE':
   $lc_text = TABLE_HEADING_IMAGE;
   $lc_align = 'center';
   break;
 case 'PRODUCT_LIST_BUY_NOW':
   $lc_text = TABLE_HEADING_BUY_NOW;
   $lc_align = 'center';
   break;
  }

  if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
 $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
  }

  $list_box_contents[1][] = array('align' => $lc_align,
							   'params' => 'class="productListing-heading"',
							   'text' => ' ' . $lc_text . ' ');
}
  $rows = 0;

  while ($listing = tep_db_fetch_array($family_query)) {
  $listing['products_name'] = tep_get_products_name($listing['products_id']);
 $rows++;

 if (($rows/2) == floor($rows/2)) {
   $list_box_contents[] = array('params' => 'class="productListing-even"');
 } else {
   $list_box_contents[] = array('params' => 'class="productListing-odd"');
 }

 $cur_row = sizeof($list_box_contents) - 1;

 for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
   $lc_align = '';

   switch ($column_list[$col]) {
	 case 'PRODUCT_LIST_NAME':
	   $lc_align = '';
	   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		 $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
	   } else {
		 $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';
	   }
	   break;
	 case 'PRODUCT_LIST_PRICE':
	   $lc_align = 'right';
	   if (tep_not_null($listing['specials_new_products_price'])) {
		 $lc_text = ' <s>' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s>  <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
	   } else {
		 $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
	   }
	   break;
	 case 'PRODUCT_LIST_IMAGE':
	   $lc_align = 'center';
	   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
		 $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
	   } else {
		 $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
	   }
	   break;
	 case 'PRODUCT_LIST_BUY_NOW':
	   $lc_align = 'center';
	   $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
	   break;
   }

   $list_box_contents[$cur_row][] = array('align' => $lc_align,
										  'params' => 'class="productListing-data"',
										  'text'  => $lc_text);
 }
  }

  new productListingBox($list_box_contents);
}
}
}
?>
<!-- family_products_eof //-->

Share this post


Link to post
Share on other sites

hi

 

just installed the family mod with no real probs, except i can't seem to find how to make "families".

 

i noted that i should change the "configuration_group ID value" to a different number as suggested so i thought i'd done everything correct.

 

i get "family products" listed in the configuration section of my admin left menu , but that only gives me formating options.

 

can someone just let me know what i should be looking for at what file to create the families?

 

i must be sooooo close

 

thanks

 

tim

Share this post


Link to post
Share on other sites

Hi

 

I have a problem with Family Products... After installing it it shows nothing when I click Asign Families from the Admin area... just a blank page with no error. I have been carefull and installed it corectly but still won't work... even tried a clean install with a fresh osc copy and still same blank page.

 

I do not get any other errors or whantever all other pages are OK:

Families OK

View Families OK

Manage Families OK

Select Display OK

Assign Families - returns a blank page with no error

 

Also I added a family category and was OK also but when I wanted to asign family returned this blank page... any ideas, please?

 

Thanks in advance

Share this post


Link to post
Share on other sites

Anybody can get the SQL file in Family Products 3.4 ?

i fail to find the SQL file ...

Who can give it to me .... :'(

Share this post


Link to post
Share on other sites

Hi, Great script thanks to the originator and all who has worked on it.....

 

Everything seems to be working just fine. No problems installing it or using it!

 

 

Just one question though, does anyone know if it is possible to show all the products in a family?

 

The way I have it, it is using the new products module on the main page, I have this set to show 9 products.

 

I would like to have the family product show all the products in the family, in my case usualy around 15 products per line.

 

 

Does anyone know how to make the family product module on the catalog side to display all the products in that family.

 

 

Thanks.


DawnMarieGifts

Share this post


Link to post
Share on other sites
Once you create a family....you must also include a product. Once this "product" is clicked on and the products_info.php file is called, the family of products will show below.

 

With what you have set up now....you would simply need to click on an accessory already found in the family, and you will see the family show up below.

 

HTH,

-Chris

 

 

hi,

 

having a small problem here. i have created a family and assign the products for that family but my question is, how do i assign the family products i've created to my products. need help please

Share this post


Link to post
Share on other sites

Hi, great contribution - all installed fine on an already modded version of OsCommerce, although I have a few questions hopefully someone can answer...

 

Heres my site so you can see what im talking about: www.discountmania.co.uk

 

 

- Firstly, Is there a way to limit how many items are shown related to the product someone is viewing? At the moment it is showing upto 10. I only want it to show 6.

 

- Can i put some kind of heading above the box? When i view as a list it says "you may also like" but when I view it as a box this dissappears.

 

- Is there a contribution/way that will allow me to add products to families when I create them and when I add them to my store, instead of adding the product and then having to navigate to a different screen to add it to a family. This will be really helpful if you've got alot of products.

 

 

cheers! :thumbsup:

Share this post


Link to post
Share on other sites

... Also...

 

- is it possible to remove products from families?

 

- and if I select "seperate" so that relevant products are grouped together the products are listed in alphabetical order when shown on the product info page, this means that the first 10 products are always shown, and you cant see anymore than this, is this really right! It seems abit pointless if you can only see the top products that are listed alphabetically. And, if I choose random then I do get a random selection but the products are not related to what my customer is viewing...

 

any suggestions?

 

All help welcome :)

Share this post


Link to post
Share on other sites
- Firstly, Is there a way to limit how many items are shown related to the product someone is viewing? At the moment it is showing upto 10. I only want it to show 6.

I would also like to know if this is possible.

Share this post


Link to post
Share on other sites

Nevermind. Seems like the rule on this forum is "do it yourself". :P

 

Open up includes\modules\family_products.php

 

Find all occurances of: limit " . MAX_DISPLAY_NEW_PRODUCTS);

 

Replace with: limit x");

 

Where x is the number of items you want to shown.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×