Index: openacs-4/packages/ecommerce/www/category-browse-subcategory-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/category-browse-subcategory-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/ecommerce/www/category-browse-subcategory-oracle.xql 13 Jan 2005 13:57:57 -0000 1.2
+++ openacs-4/packages/ecommerce/www/category-browse-subcategory-oracle.xql 11 Aug 2008 07:13:50 -0000 1.3
@@ -23,15 +23,34 @@
+
+
+ select count(*) as product_count
+ from $product_map($sub) m, ec_products_searchable p, ec_user_session_offer_codes o
+ where (p.product_id=o.product_id(+) and (user_session_id=:user_session_id or user_session_id is null))
+ and p.product_id = m.product_id
+ and m.${sub}category_id = :${sub}category_id
+ $exclude_subproducts
+
+
+
+ select r.*
+ from (
+ select rownum as r_rownum, q.*
+ from (
select p.product_id, p.dirname, p.product_name, p.one_line_description, o.offer_code
from $product_map($sub) m, ec_products_searchable p, ec_user_session_offer_codes o
where (p.product_id=o.product_id(+) and (user_session_id=:user_session_id or user_session_id is null))
and p.product_id = m.product_id
and m.${sub}category_id = :${sub}category_id
$exclude_subproducts
order by p.product_name
+ ) q
+ ) r
+ where r_rownum > :start_row
+ and r_rownum <= :start_row + :how_many
Index: openacs-4/packages/ecommerce/www/category-browse-subcategory-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/category-browse-subcategory-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/ecommerce/www/category-browse-subcategory-postgresql.xql 13 Jan 2005 13:57:57 -0000 1.2
+++ openacs-4/packages/ecommerce/www/category-browse-subcategory-postgresql.xql 11 Aug 2008 07:13:50 -0000 1.3
@@ -8,7 +8,7 @@
- select p.product_id, p.product_name, p.dirname, r.recommendation_text, o.offer_code
+ select p.product_id, p.product_name, p.dirname, p.sku, r.recommendation_text, o.offer_code
from ec_product_recommendations r, ec_products_displayable 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 p.product_id = r.product_id
@@ -22,15 +22,26 @@
+
+
+ select count(*) as product_count
+ from $product_map($sub) m, 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 p.product_id = m.product_id
+ and m.${sub}category_id = :${sub}category_id
+ $exclude_subproducts
+
+
+
- select p.product_id, p.dirname, p.product_name, p.one_line_description, o.offer_code
+ select p.product_id, p.dirname, p.product_name, p.one_line_description, p.sku, o.offer_code
from $product_map($sub) m, 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 p.product_id = m.product_id
and m.${sub}category_id = :${sub}category_id
$exclude_subproducts
- order by p.product_name
+ order by p.product_name limit :how_many offset :start_row