Index: openacs-4/packages/ecommerce/www/shopping-cart-quantities-change.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/shopping-cart-quantities-change.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/shopping-cart-quantities-change.xql 10 Jul 2001 20:42:02 -0000 1.1 +++ openacs-4/packages/ecommerce/www/shopping-cart-quantities-change.xql 26 May 2002 04:36:50 -0000 1.2 @@ -1,55 +1,41 @@ + - - + + select order_id from ec_orders where order_state='in_basket' and user_session_id=:user_session_id - - + + - - - - - select i.product_id, - i.color_choice, - i.size_choice, - i.style_choice, - count(*) as r_quantity - 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' - group by i.product_id, - i.color_choice, - i.size_choice, - i.style_choice - - - + + + select i.product_id, i.color_choice, i.size_choice, i.style_choice, count(*) as r_quantity + 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' + group by i.product_id, i.color_choice, i.size_choice, i.style_choice + + - - - - - select max(item_id) - from ec_items - where product_id=:product_id - and color_choice [ec_decode $color_choice "" "is null" "= :color_choice"] - and size_choice [ec_decode $size_choice "" "is null" "= :size_choice"] - and style_choice [ec_decode $style_choice "" "is null" "= :style_choice"] - and order_id=:order_id $extra_condition - - - + + + select max(item_id) + from ec_items + where product_id=:product_id + and color_choice [ec_decode $color_choice "" "is null" "= :color_choice"] + and size_choice [ec_decode $size_choice "" "is null" "= :size_choice"] + and style_choice [ec_decode $style_choice "" "is null" "= :style_choice"] + and order_id=:order_id $extra_condition + + - - - - delete from ec_items where item_id in ([join $rows_to_delete ", "]) - - + + + delete from ec_items + where item_id in ([join $rows_to_delete ", "]) + + -