View Single Post
  #20  
Old 01-28-2006, 09:58 AM
  moneysaver67's Avatar 
moneysaver67 moneysaver67 is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 74
 

Default

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'"); ...
__________________
X-Cart 4.0.16-.19 Gold [unix] / DSEFU
Reply With Quote