Index: openacs-4/packages/ecommerce/www/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/index.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/index.xql 10 Jul 2001 20:42:02 -0000 1.1 +++ openacs-4/packages/ecommerce/www/index.xql 26 May 2002 04:36:50 -0000 1.2 @@ -1,46 +1,49 @@ + - - - select first_names || ' ' || last_name from cc_users where user_id=:user_id - - + + + select first_names || ' ' || last_name + from cc_users + where user_id=:user_id + + - - - - update ec_user_sessions set user_id=:user_id where user_session_id = :user_session_id - - + + + update ec_user_sessions + set user_id=:user_id + where user_session_id = :user_session_id + + - - - - select p.product_name, p.product_id, p.dirname, r.recommendation_text -from ec_products_displayable p, ec_product_recommendations r -where p.product_id=r.product_id -and category_id is null -and subcategory_id is null -and subsubcategory_id is null -and (r.user_class_id is null or r.user_class_id in (select user_class_id - from ec_user_class_user_map - where user_id = :user_id - $user_class_approved_p_clause)) -and r.active_p='t' - - + + + select p.product_id, p.product_name, p.dirname, 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 + and category_id is null + and subcategory_id is null + and subsubcategory_id is null + and (r.user_class_id is null or r.user_class_id in (select user_class_id + from ec_user_class_user_map + where user_id = :user_id + $user_class_approved_p_clause)) + and r.active_p='t' + + - - - - select -p.product_name, p.product_id, p.one_line_description -from ec_products_searchable p -where not exists (select 1 from ec_category_product_map m where p.product_id = m.product_id) -order by p.product_name - - + + + 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 + + -