Hi everyone,

I found what is probably an old "what's new scrollbox". There is a bug in it that makes it where it does not scroll. Instead it just changes picture every "n" seconds. I'm not complaining about the scroll because I don't want it to scroll and I like the behavior just like it is. My problem is with the "random" selection of products. It only seems to get about 10 products and then repeats. Here is the code.

// *** Get Parameters (check if defined, if not then fill with default values)
$nfcount = @$params->count ? $params->count : "0"; // Count : 0=All / count=limit to <count> latest newsflash (most recent)
$nfdelay = @$params->delay ? $params->delay : "6000"; // Delay : 1000 = 1 seconds
$nfheight = @$params->height ? $params->height : "150"; // Height : 200px
$nfborders = @$params->borders ? $params->borders: "0"; // borders: 1
$nfpadding = @$params->padding ? $params->padding: "0"; // padding: 2
$nfbgcolor = @$params->bgcolor? $params->bgcolor: ""; // bgcolor: #F0F0F0


$random_product_query = "select products_id, products_image, products_tax_class_id, products_price
from " . TABLE_PRODUCTS . "
where products_status = '1'
order by products_date_added desc
limit " . MAX_RANDOM_SELECT_NEW;

//var_export($random_product);

$random_product = $db->Execute($random_product_query);

$i = 0;
while (!$random_product->EOF) {
$whats_new_price = zen_get_products_display_price($random_product->fields['products_id']);
$random_product->fields['products_name'] = zen_get_products_name($random_product->fields['products_id']);
$random_product->fields['specials_new_products_price'] = zen_get_products_special_price($random_product->fields['products_id']);
$title = BOX_HEADING_WHATS_NEW;
$left_corner = false;
$right_corner = false;
$right_arrow = false;
$title_link = FILENAME_PRODUCTS_NEW;
$newsflashes[$i] = '<br /><center><a class="wnImage" href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product->fields['products_id']) . '"><img src="' . DIR_WS_IMAGES . $random_product->fields['products_image']. '" alt="' . $random_product->fields['products_name'] . '" width="' . SMALL_IMAGE_WIDTH . '" height="' . SMALL_IMAGE_HEIGHT . '" style="border:1px outset #000000" onmouseover="myHint.show(\'TT4\')" onmouseout="myHint.hide()" />' . '</a><br /><a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product->fields['products_id']) . '">' . $random_product->fields['products_name'] . '</a><br />' . $whats_new_price . '</center>';
$i++;
$random_product->MoveNext();
}

Does anyone know how to fix the number of products that the module is showing? Like I said, it only shows about 10 products then repeats.

I would appreciate any help.
thanks