Index: openacs-4/packages/ecommerce/www/shopping-cart.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/shopping-cart.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/www/shopping-cart.xql 11 Jul 2001 04:52:05 -0000 1.2 +++ openacs-4/packages/ecommerce/www/shopping-cart.xql 16 Feb 2002 23:32:07 -0000 1.3 @@ -1,30 +1,34 @@ - - - select count(*) from -ec_orders o, ec_items i -where o.order_id=i.order_id -and o.user_session_id=:user_session_id and o.order_state='in_basket' - - - + + + select count(*) + from ec_orders o, ec_items i + where o.order_id=i.order_id + and o.user_session_id=:user_session_id and o.order_state='in_basket' + + - - - -select p.product_name, p.one_line_description, p.product_id, count(*) as quantity, u.offer_code, i.color_choice, i.size_choice, i.style_choice -from ec_orders o - JOIN ec_items i on (o.order_id=i.order_id) - JOIN ec_products p on (i.product_id=p.product_id) - LEFT JOIN (select product_id, offer_code from ec_user_session_offer_codes usoc where usoc.user_session_id=:user_session_id) u - on (p.product_id=u.product_id) -where o.user_session_id=:user_session_id and o.order_state='in_basket' -group by p.product_name, p.one_line_description, p.product_id, u.offer_code, i.color_choice, i.size_choice, i.style_choice - - - - + + + select p.product_name, p.one_line_description, p.product_id, count(*) as quantity, u.offer_code, i.color_choice, i.size_choice, i.style_choice + from ec_orders o + JOIN ec_items i on (o.order_id=i.order_id) + JOIN ec_products p on (i.product_id=p.product_id) + LEFT JOIN (select product_id, offer_code from ec_user_session_offer_codes usoc where usoc.user_session_id=:user_session_id) u + on (p.product_id=u.product_id) + where o.user_session_id=:user_session_id and o.order_state='in_basket' + group by p.product_name, p.one_line_description, p.product_id, u.offer_code, i.color_choice, i.size_choice, i.style_choice + + + + + select tax_rate, initcap(state_name) as state + from ec_sales_tax_by_state tax, us_states state + where state.abbrev = tax.usps_abbrev + + +