Index: openacs.org-dev/packages/ecommerce/www/select-shipping.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/ecommerce/www/select-shipping.tcl,v diff -u -r1.1.1.2 -r1.1.1.3 --- openacs.org-dev/packages/ecommerce/www/select-shipping.tcl 5 Aug 2002 21:38:45 -0000 1.1.1.2 +++ openacs.org-dev/packages/ecommerce/www/select-shipping.tcl 8 Oct 2002 15:47:06 -0000 1.1.1.3 @@ -24,7 +24,7 @@ if {$user_id == 0} { set return_url "[ad_conn url]" ad_returnredirect "/register?[export_url_vars return_url]" - return + ad_script_abort } # user sessions: @@ -50,8 +50,8 @@ # No rows came back, so they probably got here by pushing "Back", # so just redirect them to index.tcl - ad_returnredirect [ec_url]index.tcl - return + ad_returnredirect [ec_url]index + ad_script_abort } if { $order_owner != $user_id } { @@ -65,8 +65,8 @@ # If they get here, either they managed to skip past checkout.tcl, # or they messed w/their user_session_id cookie; - ad_returnredirect [ec_securelink [ec_url]checkout.tcl] - return + ad_returnredirect [ec_securelink [ec_url]checkout] + ad_script_abort } # make sure there's something in their shopping cart, otherwise @@ -78,7 +78,7 @@ from ec_items where order_id=:order_id"] == 0 } { ad_returnredirect [ec_url]shopping-cart - return + ad_script_abort } db_0or1row shipping_avail " @@ -109,7 +109,7 @@ and user_id=:user_id"] if {$n_this_address_id_for_this_user == 0} { ad_returnredirect [ec_securelink [ec_url]checkout] - return + ad_script_abort } # It checks out ok @@ -130,7 +130,7 @@ if {[info exists no_shipping_avail_p] && [string equal $no_shipping_avail_p "f"]} { ad_returnredirect [ec_securelink [ec_url]checkout] - return + ad_script_abort } } } @@ -251,7 +251,11 @@ } } } else { - ad_returnredirect "[ec_securelink [ec_url]billing]" + # User has no items that require shipping. Redirect to + # process-order-quantity-shipping so that prices + # for items can be inserted into ec_items. + ad_returnredirect "[ec_securelink [ec_url]process-order-quantity-shipping]" + # JCD: should this fall through??? } @@ -269,4 +273,6 @@ append shipping_options "[export_form_vars tax_exempt_p]" } +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