Index: uc_upsell_core.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_upsell/uc_upsell_core.inc,v
retrieving revision 1.1.2.31
diff -u -p -r1.1.2.31 uc_upsell_core.inc
--- uc_upsell_core.inc	3 Jan 2010 21:18:04 -0000	1.1.2.31
+++ uc_upsell_core.inc	19 Jun 2010 03:09:49 -0000
@@ -198,10 +198,7 @@ function uc_upsell_get_associate_nids($s
   $ary = array_unique($ary);
 
   // If count of related nodes doesn't meet threshold and can include random nodes, add them.
-  
-  /*** Notes: This code should be moved into its own method, since it's "context agnostic." 
-     - Should find a way to honor the product types settings (it currently does not) ****/
-  
+  // TODO: This code should be moved into its own method, since it's "context agnostic." 
   if (count($ary) < $max && $vars['use_random']) {
 
     $random_nids = array();
@@ -210,7 +207,7 @@ function uc_upsell_get_associate_nids($s
     $randoms = db_query("SELECT `nid`
                 FROM {node}
                 WHERE `status` = 1
-                AND `type` IN ('". implode("','", uc_product_product_types()) ."')
+                AND `type` IN ('". implode("','", $config['global']['types']) ."')
                 AND NOT nid IN (". $filter_query .")
                 ORDER BY RAND()");
 
