Index: openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.xql 26 May 2002 04:36:50 -0000 1.5 +++ openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.xql 27 Sep 2002 04:46:45 -0000 1.6 @@ -4,23 +4,25 @@ - select product_id from ec_products + select product_id from ec_products where active_p = 't' select i2.product_id as correlated_product_id, count(*) as n_product_occurrences - from ec_items i2 + from ec_items i2, ec_products p where i2.order_id in (select o2.order_id from ec_orders o2 where o2.user_id in (select user_id from ec_orders o where o.order_id in (select i.order_id from ec_items i where product_id = :product_id))) - and i2.product_id <> :product_id + and i2.product_id = p.product_id + and p.active_p = 't' + and i2.product_id <> :product_id group by i2.product_id order by n_product_occurrences desc