Index: openacs-4/packages/ecommerce/www/address-international-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/address-international-2.tcl,v diff -u -r1.5 -r1.5.4.1 --- openacs-4/packages/ecommerce/www/address-international-2.tcl 10 Dec 2002 20:06:18 -0000 1.5 +++ openacs-4/packages/ecommerce/www/address-international-2.tcl 23 Dec 2004 13:18:23 -0000 1.5.4.1 @@ -1,5 +1,7 @@ ad_page_contract { @param attn + @param first_names + @param last_name @param line1 @param line2:optional @param city @@ -19,19 +21,21 @@ } { address_type address_id:optional - attn:notnull + attn:optional + first_names + last_name line1:notnull line2:optional city:notnull full_state_name:optional zip_code:optional country_code:notnull phone - {phone_time ""} + {phone_time "d"} referer } -set possible_exception_list [list [list attn name] [list line1 address] [list city city] [list country_code country] [list phone "telephone number"]] +set possible_exception_list [list [list first_names "first name"] [list last_name "last name"] [list line1 address] [list city city] [list country_code country] [list phone "telephone number"]] set exception_count 0 set exception_text "" @@ -70,6 +74,15 @@ ad_script_abort } +# assuming all cases are billing, since shipping defaults as billing addrs +# if {$address_type == "billing"} { +# set attn from first_names and last_name +# the 3 space delimiter may be used to parse names by specific payment gateway +# first clean out all multiple spaces + regsub -all { +} $first_names " " first_names + regsub -all { +} $last_name " " last_name + set attn "[string trim $first_names] [string trim $last_name]" + if { [info exists address_id] && $address_id != "" } { # This is an existing address that has been edited. Index: openacs-4/packages/ecommerce/www/address-international.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/address-international.adp,v diff -u -r1.6.4.2 -r1.6.4.3 --- openacs-4/packages/ecommerce/www/address-international.adp 23 Dec 2004 12:10:15 -0000 1.6.4.2 +++ openacs-4/packages/ecommerce/www/address-international.adp 23 Dec 2004 13:18:23 -0000 1.6.4.3 @@ -56,7 +56,7 @@ Phone value="@phone@"> - checked>day    checked> evening + checked>day    checked> evening Index: openacs-4/packages/ecommerce/www/address-international.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/address-international.tcl,v diff -u -r1.6.4.1 -r1.6.4.2 --- openacs-4/packages/ecommerce/www/address-international.tcl 14 Nov 2004 13:08:40 -0000 1.6.4.1 +++ openacs-4/packages/ecommerce/www/address-international.tcl 23 Dec 2004 13:18:23 -0000 1.6.4.2 @@ -42,12 +42,40 @@ } else { set country_widget [ec_country_widget] - set attn [ad_quotehtml [db_string get_full_name " - select first_names || ' ' || last_name as name - from cc_users - where user_id=:user_id"]] + # Retrieve the default name. + + # get the separate fields for card processing + db_0or1row get_names " + select first_names, last_name + from cc_users + where user_id=:user_id" + # we could use a single name field for shipping + # but shipping address becomes default for billing! + # attn has a 3 space delimiter for parsing last/first names + + # set attn just in case it gets used + # avoid using it for single field name entry. + set attn "$first_names $last_name" + } +# set the defaults for name fields if they are empty +if {[info exists last_name] != 1} { + if {[info exists attn]} { + # delimiter is triple space (for parsing). + set name_delim [string first " " $attn] + if {$name_delim < 0 } { + set name_delim 0 + } + set first_names [string trim [string range $attn 0 $name_delim]] + set last_name [string range $attn [expr $name_delim + 3 ] end] + } +} +set user_last_name_with_quotes_escaped [ad_quotehtml $last_name] +set user_first_names_with_quotes_escaped [ad_quotehtml $first_names] + +set user_name_with_quotes_escaped [ad_quotehtml $attn] + # Get the form vars that were passed on delete-address so that they # can be passed back to the calling url. gift-certificate-billing has # a bunch of form vars that should not be lost. Index: openacs-4/packages/ecommerce/www/address.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/address.tcl,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/ecommerce/www/address.tcl 23 Dec 2004 11:48:48 -0000 1.8.2.2 +++ openacs-4/packages/ecommerce/www/address.tcl 23 Dec 2004 13:18:23 -0000 1.8.2.3 @@ -72,12 +72,8 @@ # set attn just in case it gets used # avoid using it for single field name entry. + set attn "$first_names $last_name" - set attn [db_string get_full_name " - select first_names || ' ' || last_name as name - from cc_users - where user_id=:user_id"] - } if { ![info exists state_widget] } { set state_widget [state_widget] Index: openacs-4/packages/ecommerce/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/index.tcl,v diff -u -r1.6.2.1 -r1.6.2.2 --- openacs-4/packages/ecommerce/www/index.tcl 23 Dec 2004 06:39:05 -0000 1.6.2.1 +++ openacs-4/packages/ecommerce/www/index.tcl 23 Dec 2004 13:18:23 -0000 1.6.2.2 @@ -50,7 +50,7 @@ # the base url allows us to switch connections to http from https if currently an https connection # for saving computing SSL resources only when necessary -set baseurl "[ec_insecurelink [ad_conn url]]" +set base_url "[ec_insecurelink [ad_conn url]]" set recommendations_if_there_are_any "" Index: openacs-4/packages/ecommerce/www/select-shipping.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/select-shipping.adp,v diff -u -r1.3.4.2 -r1.3.4.3 --- openacs-4/packages/ecommerce/www/select-shipping.adp 21 Dec 2004 10:45:23 -0000 1.3.4.2 +++ openacs-4/packages/ecommerce/www/select-shipping.adp 23 Dec 2004 13:18:23 -0000 1.3.4.3 @@ -1,10 +1,11 @@ - Shipping Method + Completing Your Order: Shipping Method @context_bar;noquote@ @ec_system_owner;noquote@ +

Choose one