Index: openacs.org-dev/packages/ecommerce/www/checkout.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/ecommerce/www/checkout.tcl,v diff -u -r1.1.1.2 -r1.1.1.3 --- openacs.org-dev/packages/ecommerce/www/checkout.tcl 5 Aug 2002 21:38:45 -0000 1.1.1.2 +++ openacs.org-dev/packages/ecommerce/www/checkout.tcl 8 Oct 2002 15:47:06 -0000 1.1.1.3 @@ -33,7 +33,7 @@ # them to index.tcl ad_returnredirect index - template::adp_abort + ad_script_abort } else { db_dml update_ec_order_set_uid " update ec_orders @@ -57,25 +57,27 @@ set shipping_required true + # Set the referer to the name of this page so that the user + # returns to this page when the changes to the address have been + # checked. + + set referer checkout # Present all saved addresses - db_multirow get_user_addresses addresses { - select address_id, attn, line1, line2, city, usps_abbrev, - zip_code, phone, country_code, full_state_name, phone_time, - address_type - from ec_addresses - where user_id=:user_id - and address_type = 'shipping' - } { + template::query get_user_addresses addresses multirow " + select address_id, attn, line1, line2, city, usps_abbrev, zip_code, phone, country_code, full_state_name, phone_time, address_type + from ec_addresses + where user_id=:user_id + and address_type = 'shipping'" -eval { set row(formatted) [ec_display_as_html [ec_pretty_mailing_address_from_args $row(line1) $row(line2) $row(city) $row(usps_abbrev) $row(zip_code) $row(country_code) \ $row(full_state_name) $row(attn) $row(phone) $row(phone_time)]] set address_id $row(address_id) - set row(delete) "[export_form_vars address_id]" - set row(edit) "[export_form_vars address_id address_type]" + set row(delete) "[export_form_vars address_id referer]" + set row(edit) "[export_form_vars address_id address_type referer]" set row(use) "[export_form_vars address_id]" } - set hidden_form_vars [export_form_vars address_type] + set hidden_form_vars [export_form_vars address_type referer] } else { set shipping_required false @@ -84,6 +86,9 @@ if { $shipping_required == "false" } { set address_id "" ad_returnredirect "checkout-2?[export_url_vars address_id address_type]" + ad_script_abort } +set context_bar [template::adp_parse [acs_root_dir]/packages/[ad_conn package_key]/www/contextbar [list context_addition [list "Completing Your Order"]]] +set ec_system_owner [ec_system_owner] db_release_unused_handles