Index: openacs-4/packages/ecommerce/www/checkout-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/checkout-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/www/checkout-2.tcl 22 Oct 2001 07:00:44 -0000 1.2 +++ openacs-4/packages/ecommerce/www/checkout-2.tcl 23 Nov 2001 23:06:16 -0000 1.3 @@ -13,18 +13,17 @@ } # ec_redirect_to_https_if_possible_and_necessary -ns_log debug "co2 a" + # we need them to be logged in set user_id [ad_verify_and_get_user_id] if {$user_id == 0} { set return_url "[ad_conn url]" -ns_log debug "co2 b user_id $user_id return_url $return_url" ad_returnredirect "/register?[export_url_vars return_url]" return } -ns_log debug "co2 c" + # user sessions: # 1. get user_session_id from cookie # 2. if user has no session (i.e. user_session_id=0), attempt to set it if it hasn't been @@ -33,10 +32,9 @@ # without cookies set user_session_id [ec_get_user_session_id] -ns_log debug "co2 d" ec_create_new_session_if_necessary [export_url_vars address_id] + # type5 -ns_log debug "co2 e" # make sure they have an in_basket order, otherwise they've probably # gotten here by pushing Back, so return them to index.tcl @@ -52,7 +50,6 @@ if { ! $success_p } { # No rows came back, so they probably got here by pushing "Back", so just redirect them # to index.tcl -ns_log debug "co2 f" ad_returnredirect index.tcl return } @@ -67,7 +64,6 @@ # if they get here, # either they managed to skip past checkout.tcl, or they messed # w/their user_session_id cookie; -ns_log debug "co2 g" ad_returnredirect checkout.tcl return } @@ -78,7 +74,6 @@ # that it's empty. if { [db_string get_ec_item_count "select count(*) from ec_items where order_id=:order_id"] == 0 } { -ns_log debug "co2 h" ad_returnredirect shopping-cart return } @@ -100,7 +95,6 @@ set n_this_address_id_for_this_user [db_string get_an_address_id "select count(*) from ec_addresses where address_id=:address_id and user_id=:user_id"] if {$n_this_address_id_for_this_user == 0} { -ns_log debug "co2 i" ad_returnredirect checkout return } @@ -109,7 +103,6 @@ } else { set address_id [db_string get_address_id "select shipping_address from ec_orders where order_id=:order_id" -default ""] if { [empty_string_p $address_id] } { -ns_log debug "co2 j" ad_returnredirect checkout return } @@ -172,7 +165,6 @@ # Trying out the fancy new . arrays. It would be much better to rework this # for a 2D array,multiple setup, but I don't have time to think about it now... -ns_log debug "co2 k" append rows_of_items " $product_name[ec_decode $options "" "" ", $options"]
@@ -206,7 +198,6 @@ " } } -ns_log debug "co2 l" set tax_exempt_options "" if { [util_memoize {ad_parameter -package_id [ec_id] OfferTaxExemptStatusP ecommerce 0} [ec_cache_refresh]] } { @@ -218,5 +209,4 @@ No" } db_release_unused_handles -ns_log debug "co2 m" ec_return_template