Quote:
Originally Posted by sandersdesign
I was trying to figure out a way adapt the 'Featured Products' tools so that it only shows random products from specified categories.
|
Isn't it just a matter of placing this on one of your category pages?
Code:
#
# Get products data for current category and store it in an array
#
$cat = intval($cat);
if ($cat) {
$category_data = func_query_first("SELECT categoryid_path FROM $sql_tbl[categories] USE INDEX (PRIMARY) WHERE categoryid='$cat'");
$result = func_query("SELECT categoryid FROM $sql_tbl[categories] USE INDEX (pam) WHERE categoryid_path LIKE '$category_data[categoryid_path]/%' AND avail='Y'");
...