Index: openacs-4/packages/ecommerce/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/index-postgresql.xql,v
diff -u -r1.4.8.1 -r1.4.8.2
--- openacs-4/packages/ecommerce/www/index-postgresql.xql 23 Dec 2004 06:39:05 -0000 1.4.8.1
+++ openacs-4/packages/ecommerce/www/index-postgresql.xql 11 Jun 2005 05:39:51 -0000 1.4.8.2
@@ -23,14 +23,24 @@
+
+
+ select count(*) as product_count
+ from ec_products_searchable p left outer join ec_user_session_offer_codes o on (p.product_id = o.product_id and user_session_id = :user_session_id)
+ where not exists (select 1
+ from ec_category_product_map m
+ where p.product_id = m.product_id)
+
+
+
select p.product_id, p.product_name, p.one_line_description, o.offer_code
from ec_products_searchable p left outer join ec_user_session_offer_codes o on (p.product_id = o.product_id and user_session_id = :user_session_id)
where not exists (select 1
from ec_category_product_map m
where p.product_id = m.product_id)
- order by p.product_name
+ order by p.product_name limit :how_many offset :start_row