Index: openacs-4/packages/ecommerce/www/checkout.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/checkout.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/www/checkout.tcl 22 Jul 2001 06:21:37 -0000 1.2 +++ openacs-4/packages/ecommerce/www/checkout.tcl 16 Feb 2002 23:32:06 -0000 1.3 @@ -10,19 +10,15 @@ usca_p:optional } +# rolled login requirement into ec_redirect_to_https_if_possible_and_necessary ec_redirect_to_https_if_possible_and_necessary -# rolled login requirement into ec_redirect_to_https_if_possible_and_necessary - -set user_id [ad_verify_and_get_user_id] - # make sure they have an in_basket order, otherwise they've probably # gotten here by pushing Back, so return them to index.tcl +set user_id [ad_verify_and_get_user_id] set user_session_id [ec_get_user_session_id] - ec_create_new_session_if_necessary -# type1 ec_log_user_as_user_id_for_this_session @@ -37,7 +33,6 @@ db_dml update_ec_order_set_uid "update ec_orders set user_id=:user_id where order_id=:order_id" } - # check whether or not shipping is available set shipping_unavail_p [db_string check_order_shippable " select count(*) @@ -49,12 +44,12 @@ and no_shipping_avail_p = 't')"] # see if there are any saved shipping addresses for this user - -set saved_addresses "You can select an address listed below or enter a new address.\n -

- +set saved_addresses " +You can select an address listed below or enter a new address. +
" +# Present all saved addresses db_foreach get_user_addresses " select address_id, attn, line1, @@ -67,28 +62,26 @@ and address_type='shipping' " { - + # Present a single saved address append saved_addresses " - - + + " - -} if_no_rows { +} if_no_rows { set saved_addresses "" } -db_release_unused_handles - +# Add closing table tag if there are saved addresses if {![empty_string_p $saved_addresses] } { - # We found some addresses - append saved_addresses "
- [ec_display_as_html [ec_pretty_mailing_address_from_args $line1 $line2 $city $usps_abbrev $zip_code $country_code $full_state_name $attn $phone $phone_time]] - - \[use this address\] - [ec_display_as_html [ec_pretty_mailing_address_from_args $line1 $line2 $city $usps_abbrev $zip_code $country_code $full_state_name $attn $phone $phone_time]]

\[use this address\]
+ \[edit this address\]
+ \[delete this address\]

" + append saved_addresses " + + " } +db_release_unused_handles ec_return_template