Index: openacs-4/packages/ecommerce/www/process-order-quantity-shipping.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/process-order-quantity-shipping.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/www/process-order-quantity-shipping.xql 11 Jul 2001 04:52:05 -0000 1.2 +++ openacs-4/packages/ecommerce/www/process-order-quantity-shipping.xql 26 May 2002 04:36:50 -0000 1.3 @@ -1,119 +1,101 @@ + - - - select order_id from ec_orders where user_session_id=:user_session_id and order_state='in_basket' - - + + + select order_id + from ec_orders + where user_session_id=:user_session_id + and order_state='in_basket' + + - - - - select count(*) from ec_items where order_id=:order_id - - + + + select count(*) + from ec_items + where order_id=:order_id + + - - - - select user_id from ec_orders where order_id=:order_id - - + + + select user_id + from ec_orders + where order_id=:order_id + + - - - - select shipping_address from ec_orders where order_id=:order_id - - + + + select shipping_address + from ec_orders + where order_id=:order_id + + - - - + + update ec_orders -set shipping_method=:shipping_method, - tax_exempt_p=:tax_exempt_p -where order_id=:order_id - - + set shipping_method=:shipping_method, + tax_exempt_p=:tax_exempt_p + where order_id=:order_id + + - - - - select user_class_id from ec_user_class_user_map where user_id=:user_id $additional_user_class_restriction - - + + + select user_class_id + from ec_user_class_user_map + where user_id=:user_id $additional_user_class_restriction + + - - - - select default_shipping_per_item, weight_shipping_cost from ec_admin_settings - - + + + select default_shipping_per_item, weight_shipping_cost + from ec_admin_settings + + - - - - select add_exp_amount_per_item, add_exp_amount_by_weight from ec_admin_settings - - + + + select add_exp_amount_per_item, add_exp_amount_by_weight + from ec_admin_settings + + - - - - select usps_abbrev from ec_addresses where address_id=:address_id - - + + + select usps_abbrev + from ec_addresses + where address_id=:address_id + + - - - - select tax_rate, shipping_p from ec_sales_tax_by_state where usps_abbrev=:usps_abbrev - - + + + select tax_rate, shipping_p + from ec_sales_tax_by_state + where usps_abbrev=:usps_abbrev + + - - - + + + update ec_items + set price_charged=round(:price_charged,2), price_name=:price_name, shipping_charged=round(:shipping_charged,2), price_tax_charged=round(:tax_charged,2), shipping_tax_charged=round(:shipping_tax,2) + where item_id=:item_id + + -select i.item_id, i.product_id, u.offer_code -from ec_items i - LEFT JOIN -(select * from ec_user_session_offer_codes usoc where usoc.user_session_id=:user_session_id) u - on (i.product_id=u.product_id) -where i.order_id=:order_id + + + update ec_orders + set shipping_charged=round(:order_shipping_cost,2), shipping_tax_charged=round(:tax_on_order_shipping_cost,2) + where order_id=:order_id + + - - - - - - - update ec_items set price_charged=round(:price_charged,2), price_name=:price_name, shipping_charged=round(:shipping_charged,2), price_tax_charged=round(:tax_charged,2), shipping_tax_charged=round(:shipping_tax,2) where item_id=:item_id - - - - - - - select coalesce(base_shipping_cost,0) from ec_admin_settings - - - - - - - select coalesce(add_exp_base_shipping_cost,0) from ec_admin_settings - - - - - - - update ec_orders set shipping_charged=round(:order_shipping_cost,2), shipping_tax_charged=round(:tax_on_order_shipping_cost,2) where order_id=:order_id - - - -