Index: openacs-4/packages/ecommerce/ecommerce.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/ecommerce.info,v diff -u -r1.33 -r1.34 --- openacs-4/packages/ecommerce/ecommerce.info 11 Dec 2003 21:40:02 -0000 1.33 +++ openacs-4/packages/ecommerce/ecommerce.info 8 Mar 2004 19:46:09 -0000 1.34 @@ -1,20 +1,19 @@ - + E-Commerce E-Commerce-ii f - - t - - + f + + Janine Sisk - Bart Teeuwisse - The ACS 3.x based e-commerce solution ported to OpenACS. + Bart Teeuwisse + ACS 3.x based e-commerce solution.See the documentation for more information. 2003-03-23 furfly.net, LLC - This module implements all that IT needs for a standard business-to-consumer Web service. You can find a feature summary in the documentaion. + This module implements all that IT needs for a standard business-to-consumer Web service. You can find a feature summary in the documentaion. @@ -973,7 +972,7 @@ - + Index: openacs-4/packages/ecommerce/sql/postgresql/ecommerce-defaults.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/sql/postgresql/ecommerce-defaults.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/sql/postgresql/ecommerce-defaults.sql 26 May 2002 04:36:49 -0000 1.2 +++ openacs-4/packages/ecommerce/sql/postgresql/ecommerce-defaults.sql 8 Mar 2004 19:46:10 -0000 1.3 @@ -47,6 +47,8 @@ || '' || '\n' || '\n' || '

' || '\n' || '<%= $detailed_description %>' || '\n' || '\n' + || ' <%= [ec_product_link_if_exists $product_id] %>' || '\n' + || '
' || '\n' || '<%= [ec_display_product_purchase_combinations $product_id] %>' || '\n' || '\n' || '<%= [ec_product_links_if_they_exist $product_id] %>' || '\n' || '\n' || '<%= [ec_professional_reviews_if_they_exist $product_id] %>' || '\n' || '\n' Index: openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql 30 Nov 2002 17:31:18 -0000 1.7 +++ openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql 8 Mar 2004 19:46:11 -0000 1.8 @@ -9,7 +9,7 @@ select c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, - c.creditcard_type, p.first_names || ' ' || p.last_name as card_name, + c.creditcard_type, a.attn as card_name, a.zip_code as billing_zip, a.line1 as billing_address, a.city as billing_city, @@ -24,7 +24,7 @@ - select f.transaction_amount, f.transaction_id, c.creditcard_type, p.first_names || ' ' || p.last_name as card_name, + select f.transaction_amount, f.transaction_id, c.creditcard_type, a.attn as card_name, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_type, a.zip_code as billing_zip, a.line1 as billing_address, @@ -43,7 +43,7 @@ select t.refunded_transaction_id, t.transaction_amount, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_type, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, a.zip_code as billing_zip, a.line1 as billing_address, a.city as billing_city, Index: openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs.tcl 15 Nov 2003 06:48:11 -0000 1.7 +++ openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs.tcl 8 Mar 2004 19:46:11 -0000 1.8 @@ -51,7 +51,7 @@ # PaymentGateway. if {[empty_string_p $payment_gateway] || ![acs_sc_binding_exists_p "PaymentGateway" $payment_gateway]} { - set outcome(response_code) "failed_authorization" + set outcome(response_code) "failure" set outcome(transaction_id) "$transaction_id" return [array get outcome] } @@ -89,7 +89,7 @@ if {![db_0or1row creditcard_data_select " select c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, - c.creditcard_type, p.first_names || ' ' || p.last_name as card_name, + c.creditcard_type, a.attn as card_name, a.zip_code as billing_zip, a.line1 as billing_address, a.city as billing_city, @@ -259,7 +259,7 @@ # transaction. db_1row transaction_select " - select f.transaction_amount, f.transaction_id, c.creditcard_type, p.first_names || ' ' || p.last_name as card_name, + select f.transaction_amount, f.transaction_id, c.creditcard_type, a.attn card_name, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_type, a.zip_code as billing_zip, a.line1 as billing_address, @@ -430,7 +430,7 @@ if {![db_0or1row transaction_info_select " select t.refunded_transaction_id, t.transaction_amount, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_type, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, a.zip_code as billing_zip, a.line1 as billing_address, a.city as billing_city, Index: openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.tcl 10 Dec 2002 20:06:32 -0000 1.8 +++ openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.tcl 8 Mar 2004 19:46:11 -0000 1.9 @@ -11,18 +11,14 @@ @revision-date April 2002 } -ad_proc -deprecated ec_sendmail_from_service { +ad_proc ec_sendmail_from_service { email_to reply_to email_subject email_body {additional_headers ""} {bcc ""} } { - This is deprecated. It is qmail-specific. See acs-mail-lite package. - - @see acs_mail_lite::send - Use this when you're sending out customer service emails. It's invoked just like ns_sendmail, except that the email will always be from the customer service email address. The reply-to field @@ -105,10 +101,9 @@ # Create a customer service issue/interaction/action - set user_identification_and_issue_id - [ec_customer_service_simple_issue "" "automatic" "email" \ - "To: $email\nFrom: [ad_parameter -package_id [ec_id] CustomerServiceEmailAddress ecommerce]\nSubject: $email_subject" \ - $order_id $issue_type_list $email_body $user_id] + set user_identification_and_issue_id [ec_customer_service_simple_issue "" "automatic" "email" \ + "To: $email\nFrom: [ad_parameter -package_id [ec_id] CustomerServiceEmailAddress ecommerce]\nSubject: $email_subject" \ + $order_id $issue_type_list $email_body $user_id] set user_identification_id [lindex $user_identification_and_issue_id 0] set issue_id [lindex $user_identification_and_issue_id 1] @@ -126,9 +121,8 @@ } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" - + + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" ec_email_product_notification $order_id } } @@ -140,7 +134,7 @@ require it. } { - set order_link [ec_securelink "[ec_url]admin/orders/one?[export_url_vars order_id]"] + set order_link [ec_securelink "[ad_url][ec_url]admin/orders/one?[export_url_vars order_id]"] db_foreach notification_select { select ep.email_on_purchase_list, ep.product_name @@ -150,9 +144,8 @@ group by ep.email_on_purchase_list, ep.product_name } { set email_from [ec_customer_service_email_address] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr $email_on_purchase_list -from_addr $from_name -subject "An order for $product_name" -body " -A order for $product_name has been placed at [ec_system_name]. + ec_sendmail_from_service $email_on_purchase_list $email_from "An order for $product_name" " +An order for $product_name has been placed at [ec_system_name]. The order can be viewed at: @@ -217,8 +210,7 @@ } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } @@ -310,8 +302,7 @@ (:user_identification_id, 2, :order_id, :shipment_id, sysdate)" } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } @@ -377,8 +368,8 @@ } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } @@ -460,8 +451,7 @@ } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } @@ -574,7 +564,6 @@ (:user_identification_id, 5, :gift_certificate_id, sysdate)" } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl 1 Nov 2003 08:45:38 -0000 1.21 +++ openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl 8 Mar 2004 19:46:11 -0000 1.22 @@ -13,7 +13,7 @@ # someone new logs in ad_proc ec_user_session_logout {{why ""}} { ad_set_cookie -replace t -max_age 0 user_session_id 0 - ns_log debug "ec_user_session_logout: user_session_id cookie expired" + ns_log notice "user_session_id cookie expired" return filter_ok } @@ -383,7 +383,7 @@ db_0or1row mailing_categories {} if { ![empty_string_p $category_id] || ![empty_string_p $subcategory_id] || ![empty_string_p $subsubcategory_id] } { - return "Add yourself to the [ec_full_categorization_display $category_id $subcategory_id $subsubcategory_id] mailing list!" + return "Add yourself to the [ec_full_categorization_display $category_id $subcategory_id $subsubcategory_id] mailing list!" } else { return "" } @@ -484,7 +484,7 @@ select publication, author_name, review_date, review from ec_product_reviews where product_id = :product_id and display_p = 't' } { if { [empty_string_p $product_reviews] } { - append product_reviews "Professional Reviews\n

\n" + append product_reviews "Professional Reviews\n

\n" } append product_reviews "$review
\n -- [ec_product_review_summary $author_name $publication $review_date]

\n" } @@ -523,7 +523,7 @@ } set to_return "


- [ad_system_name] Member Reviews: + [ad_system_name] Member Reviews: " set comments_to_print "" @@ -968,11 +968,9 @@ [join $item_list "\n"] " - } elseif { $n_items == 1 } { + } else { db_1row item_in_an_order_select $sql return " $product_name; $price_name: [ec_pretty_price $price_charged]" - } else { - return "No items need shipping in this order" } } Index: openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs-postgresql.xql 26 May 2002 04:36:49 -0000 1.6 +++ openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs-postgresql.xql 8 Mar 2004 19:46:11 -0000 1.7 @@ -10,7 +10,7 @@ select o.order_id, ec_order_cost(o.order_id) as total_order_price, f.transaction_id, f.inserted_date, f.transaction_amount, - c.creditcard_type as card_type, p.first_names || ' ' || p.last_name as card_name, + c.creditcard_type as card_type, a.attn as card_name, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_type, a.zip_code as billing_zip, a.line1 as billing_address, @@ -41,7 +41,7 @@ select g.gift_certificate_id, f.transaction_id, f.transaction_amount, f.inserted_date, c.creditcard_type, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, a.zip_code as billing_zip, a.line1 as billing_address, a.city as billing_city, @@ -125,7 +125,7 @@ select f.transaction_id, f.order_id, f.transaction_amount, f.to_be_captured_date, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_number as card_number, c.creditcard_type, a.zip_code as billing_zip, a.line1 as billing_address, @@ -180,7 +180,7 @@ select f.transaction_id, f.order_id, f.transaction_amount, f.to_be_captured_date, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, c.creditcard_number as card_number, c.creditcard_type, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, a.zip_code as billing_zip, a.line1 as billing_address, Index: openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.tcl 10 Dec 2002 20:06:32 -0000 1.11 +++ openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.tcl 8 Mar 2004 19:46:11 -0000 1.12 @@ -183,14 +183,14 @@ db_foreach transactions_select " select o.order_id, ec_order_cost(o.order_id) as total_order_price, f.transaction_id, f.inserted_date, f.transaction_amount, c.creditcard_type as card_type, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_type, a.zip_code as billing_zip, a.line1 as billing_address, a.city as billing_city, coalesce(a.usps_abbrev, a.full_state_name) as billing_state, a.country_code as billing_country - from ec_orders o, ec_financial_transactions f, ec_creditcards c, persons p + from ec_orders o, ec_financial_transactions f, ec_creditcards c, persons p, ec_addresses a where order_state = 'confirmed' and (sysdate - confirmed_date) > 1/96 and f.failed_p = 'f' @@ -394,7 +394,7 @@ db_foreach transactions_select " select g.gift_certificate_id, f.transaction_id, f.transaction_amount, f.inserted_date, c.creditcard_type, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, a.zip_code as billing_zip, a.line1 as billing_address, a.city as billing_city, @@ -687,7 +687,7 @@ db_foreach transactions_select " select f.transaction_id, f.order_id, f.transaction_amount, f.to_be_captured_date, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_number as card_number, c.creditcard_type, a.zip_code as billing_zip, a.line1 as billing_address, @@ -846,7 +846,7 @@ db_foreach transactions_select " select f.transaction_id, f.order_id, f.transaction_amount, f.to_be_captured_date, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, c.creditcard_number as card_number, c.creditcard_type, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, a.zip_code as billing_zip, a.line1 as billing_address, @@ -1012,7 +1012,7 @@ db_foreach transactions_select " select f.transaction_id, f.order_id, f.transaction_amount, f.to_be_captured_date, c.creditcard_type as card_type, - p.first_names || ' ' || p.last_name as card_name, c.creditcard_number as card_number, + a.attn as card_name, c.creditcard_number as card_number, c.creditcard_expire as card_expiration, c.creditcard_type a.zip_code as billing_zip, a.line1 as billing_address, Index: openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.xql 27 Sep 2002 04:46:45 -0000 1.6 +++ openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs.xql 8 Mar 2004 19:46:11 -0000 1.7 @@ -147,7 +147,7 @@ select f.transaction_id, f.order_id, f.transaction_amount, f.to_be_captured_date, - p.first_names || ' ' || p.last_name as card_name, + a.attn as card_name, c.creditcard_number as card_number, substring(creditcard_expire for 2) as card_exp_month, substring(creditcard_expire from 4 for 2) as card_exp_year, c.creditcard_type, a.zip_code as billing_zip, a.line1 as billing_address, Index: openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl 10 Dec 2002 20:06:32 -0000 1.12 +++ openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl 8 Mar 2004 19:46:11 -0000 1.13 @@ -80,6 +80,9 @@ if { [string compare $formatted_price "-0.00"] == 0 } { set formatted_price "0.00" } + + set formatted_price [util_commify_number $formatted_price] + } if { $currency == "USD" } { @@ -324,18 +327,18 @@ if { [file exists "$full_dirname/product.jpg"] } { set linked_thumbnail " - + \"Product " } elseif { [file exists "$full_dirname/product.gif"] } { set linked_thumbnail " - + \"Product " } } else { set linked_thumbnail " - + \"Product " } } @@ -1043,3 +1046,59 @@ ec_product_purchase_comb.product_1, ec_product_purchase_comb.product_2, ec_product_purchase_comb.product_3, ec_product_purchase_comb.product_4))} } + + +ad_proc ec_gets_char_delimited_line { + fileId + varName + {delimiter "\t"} +} { + Reads and parses a line of data from a character delimited file + similar to ns_getscsv. Defaults to delimit tabs +} { + upvar $varName split_line + if {[eof $fileId]} { + set return_val -1 + set split_line [list] + } else { + gets $fileId line + set split_line [split $line $delimiter] + set return_val [llength $split_line] + } + return $return_val +} + +ad_proc ec_product_url_if_exists { + product_id +} { + + Returns product url of product id, or null if none exists + +} { + set product_url [db_string get_product_url " + select url + from ec_products + where product_id=:product_id" -default ""] + return $product_url +} + +ad_proc ec_product_link_if_exists { + product_id + {link_label "more details"} +} { + + Returns product link (to ec_products url with link_label wrapped by anchor tag) of product id, or null if no url exists. + link_label defaults to "more details" + +} { + set product_url [db_string get_product_url " + select url + from ec_products + where product_id=:product_id" -default ""] + if { ![empty_string_p $product_url] } { + set product_link "$link_label" + } else { + set product_link "" + } + return $product_link +} Index: openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.xql 27 Sep 2002 04:46:45 -0000 1.5 +++ openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.xql 8 Mar 2004 19:46:11 -0000 1.6 @@ -95,4 +95,12 @@ + + + select url + from ec_products + where product_id = :product_id + + + Index: openacs-4/packages/ecommerce/tcl/ecommerce-widgets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-widgets-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/ecommerce/tcl/ecommerce-widgets-procs.tcl 11 Dec 2003 21:40:02 -0000 1.15 +++ openacs-4/packages/ecommerce/tcl/ecommerce-widgets-procs.tcl 8 Mar 2004 19:46:11 -0000 1.16 @@ -14,8 +14,9 @@ } { Creates an ecommerce search widget, using the specified category id and search text if necessary } { + set action_url "[ec_url]product-search" return " -
+ @@ -39,9 +40,9 @@ Category widget combining categories and subcategories } { if { $multiple_p == "f" } { - set select_tag "\n" } else { - set select_tag "\n" } set to_return "" set category_counter 0 @@ -74,9 +75,9 @@ # Check if the subcategory has been selected. if { [lsearch -exact $default "$category_id|$subcategory_id"] != -1 || [lsearch -exact $default $subcategory_name] != -1 } { - append to_return "" + append to_return "" } else { - append to_return "" + append to_return "" } } } @@ -1014,7 +1015,7 @@ } { if { ![regexp -nocase {([0-9]+):([0-9]+):([0-9]+)} $timestamp match hours mins secs]} { - ad_return_complaint 1 "
  • The time part of the timestamp is not in the correct format. It must be HH12:MI:SS" + ad_return_complaint "1" "
  • The time part of the timestamp is not in the correct format. It must be HH12:MI:SS" return -code return } else { Index: openacs-4/packages/ecommerce/tcl/qmail-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/qmail-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/tcl/qmail-procs.tcl 18 Feb 2003 19:42:19 -0000 1.4 +++ openacs-4/packages/ecommerce/tcl/qmail-procs.tcl 8 Mar 2004 19:46:11 -0000 1.5 @@ -12,25 +12,5 @@ @author jsc @creation-date 1999-01-15 } { - set msg "To: $to\nFrom: $from\nSubject: $subject\nDate: [ns_httptime [ns_time]]" - ## Insert extra headers, if any - if ![string match "" $extraheaders] { - set size [ns_set size $extraheaders] - for {set i 0} {$i < $size} {incr i} { - append msg "\n[ns_set key $extraheaders $i]: [ns_set value $extraheaders $i]" - } - } - - append msg "\n\n$body" - - # Specify the envelope sender address so that we don't see the default - # Return-Path of anonymous@host.domain - if [regexp {.*<(.*)>} $from ig address] { - set from $address - } - - # -h says use header fields for recipients - set qmail_pipe [open "| /var/qmail/bin/qmail-inject -h -f$from" "w"] - puts -nonewline $qmail_pipe $msg - close $qmail_pipe + ns_sendmail $to $from $subject $body $extraheaders } Index: openacs-4/packages/ecommerce/www/account.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/account.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/account.adp 15 Nov 2003 06:48:11 -0000 1.4 +++ openacs-4/packages/ecommerce/www/account.adp 8 Mar 2004 19:46:11 -0000 1.5 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + your-account
      Index: openacs-4/packages/ecommerce/www/address-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/address-2.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/www/address-2.tcl 10 Dec 2002 20:06:18 -0000 1.6 +++ openacs-4/packages/ecommerce/www/address-2.tcl 8 Mar 2004 19:46:11 -0000 1.7 @@ -2,6 +2,8 @@ @param address_id:optional @param address_type @param attn + @param first_names + @param last_name @param line1 @param line2:optional @param city @@ -20,7 +22,9 @@ } { address_type address_id:optional - attn + attn:optional + first_names + last_name line1 line2:optional city @@ -31,7 +35,10 @@ referer } -set possible_exception_list [list [list attn name] [list line1 address] [list city city] [list usps_abbrev state] [list zip_code "zip code"] [list phone "telephone number"]] +# since shipping address becomes default for billing, assume billing config +# for purposes of checking last_name first_names instead of attn +# replaced list attn name with cases for first_names and last_name + set possible_exception_list [list [list first_names "first name"] [list last_name "last name"] [list line1 address] [list city city] [list usps_abbrev state] [list zip_code "zip code"] [list phone "telephone number"]] set exception_count 0 set exception_text "" @@ -77,6 +84,16 @@ } } +# 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.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/address.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/www/address.adp 22 May 2003 14:48:11 -0000 1.6 +++ openacs-4/packages/ecommerce/www/address.adp 8 Mar 2004 19:46:11 -0000 1.7 @@ -22,8 +22,14 @@
  • - - + + + + + + + @@ -44,15 +50,8 @@
    NameFirst Name +
    Last Name
    Address
    Phone - value="@phone@"> - checked - - >day     - checked - - > evening + value="@phone@"> + checked>day    checked>evening
    Index: openacs-4/packages/ecommerce/www/address.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/address.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/ecommerce/www/address.tcl 10 Dec 2002 20:06:18 -0000 1.7 +++ openacs-4/packages/ecommerce/www/address.tcl 8 Mar 2004 19:46:11 -0000 1.8 @@ -4,9 +4,11 @@ @param address_id:optional @param referer + @author + @creation-date @author ported by Jerry Asher (jerry@theashergroup.com) @author revised by Bart Teeuwisse (bart.teeuwisse@thecodemill.biz) - @creation-date revised April 2002 + @revision-date April 2002 } { address_type @@ -34,6 +36,16 @@ from ec_addresses where address_id=:address_id" + 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] + } + # Redirect to the international address form if the address is # outside the United States. @@ -49,10 +61,22 @@ # 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 [db_string get_full_name " - select first_names || ' ' || last_name as name - from cc_users - where user_id=:user_id"] + select first_names || ' ' || last_name as name + from cc_users + where user_id=:user_id"] } if { ![info exists state_widget] } { @@ -82,6 +106,20 @@ append hidden_form_vars "[export_form_vars [ns_set key $form_set $i]]" } +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] 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] Index: openacs-4/packages/ecommerce/www/address.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/address.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/address.xql 26 May 2002 05:09:57 -0000 1.1 +++ openacs-4/packages/ecommerce/www/address.xql 8 Mar 2004 19:46:11 -0000 1.2 @@ -4,12 +4,20 @@ - select first_names || ' ' || last_name as name + select first_names || ' ' || last_name as name from cc_users where user_id=:user_id + + + select first_names, last_name + from cc_users + where user_id=:user_id + + + select attn, line1, line2, city, usps_abbrev, zip_code, phone, country_code, full_state_name, phone_time Index: openacs-4/packages/ecommerce/www/category-browse-subcategory.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/category-browse-subcategory.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/category-browse-subcategory.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/category-browse-subcategory.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,9 +3,10 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t
    + @@ -24,11 +25,11 @@
    - +

    @category_name@ > @subcategory_name@ products:

    - @products@ + @products;noquote@ @prev_link@ @separator@ @next_link@
    -

    Add yourself to the @the_category_name@ mailing list!

    +

    Add yourself to the @the_category_name@ mailing list!

    Index: openacs-4/packages/ecommerce/www/category-browse-subcategory.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/category-browse-subcategory.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ecommerce/www/category-browse-subcategory.tcl 10 Dec 2002 20:06:18 -0000 1.5 +++ openacs-4/packages/ecommerce/www/category-browse-subcategory.tcl 8 Mar 2004 19:46:11 -0000 1.6 @@ -84,7 +84,7 @@ # Recommended products in this category -set recommendations "" +set recommendations {
    } if { [ad_parameter -package_id [ec_id] UserClassApproveP ecommerce] } { set user_class_approved_p_clause "and user_class_approved_p = 't'" @@ -114,7 +114,7 @@ " } -if {[string equal $recommendations "
    "]} { +if {[string equal $recommendations {
    }]} { set recommendations "" } else { append recommendations "
    " @@ -136,7 +136,7 @@ " } -set products "" +set products {
    } set have_how_many_more_p f set count 0 Index: openacs-4/packages/ecommerce/www/category-browse-subsubcategory.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/category-browse-subsubcategory.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/category-browse-subsubcategory.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/category-browse-subsubcategory.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,7 @@ @context_bar;noquote@@ec_system_owner;noquote@ - + t
    Index: openacs-4/packages/ecommerce/www/category-browse-subsubcategory.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/category-browse-subsubcategory.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ecommerce/www/category-browse-subsubcategory.tcl 10 Dec 2002 20:06:18 -0000 1.5 +++ openacs-4/packages/ecommerce/www/category-browse-subsubcategory.tcl 8 Mar 2004 19:46:11 -0000 1.6 @@ -82,7 +82,7 @@ # Recommended products in this category -set recommendations "
    " +set recommendations {
    } if { [ad_parameter -package_id [ec_id] UserClassApproveP ecommerce] } { set user_class_approved_p_clause "and user_class_approved_p = 't'" @@ -111,7 +111,7 @@ " } -if {[string equal $recommendations "
    [ec_price_line $product_id $user_id $offer_code]
    "]} { +if {[string equal $recommendations {
    }]} { set recommendations "" } else { append recommendations "
    " Index: openacs-4/packages/ecommerce/www/category-browse.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/category-browse.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/category-browse.adp 15 Nov 2003 06:48:11 -0000 1.4 +++ openacs-4/packages/ecommerce/www/category-browse.adp 8 Mar 2004 19:46:11 -0000 1.5 @@ -3,32 +3,36 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t -
    +
    -

    Browse:

    -
      +

      @category_name@ > subcategories

      + @subcategories;noquote@ -
    +

    We recommend:

    @recommendations;noquote@ +
    +
    -

    @category_name@ products:

    + +

    @category_name@ items:

    @products;noquote@ @prev_link;noquote@ @separator;noquote@ @next_link;noquote@ -
    + -

    Add yourself to the @the_category_name@ mailing list!

    + +

    Add yourself to the @the_category_name@ mailing list!

    Index: openacs-4/packages/ecommerce/www/category-browse.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/category-browse.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/ecommerce/www/category-browse.tcl 10 Dec 2002 20:06:18 -0000 1.7 +++ openacs-4/packages/ecommerce/www/category-browse.tcl 8 Mar 2004 19:46:11 -0000 1.8 @@ -124,7 +124,7 @@ # Recommended products in this category -set recommendations "" +set recommendations {
    } if { [ad_parameter -package_id [ec_id] UserClassApproveP ecommerce] } { set user_class_approved_p_clause "and user_class_approved_p = 't'" @@ -153,7 +153,7 @@ " } -if {[string equal $recommendations "
    [ec_price_line $product_id $user_id $offer_code]
    "]} { +if {[string equal $recommendations {
    }]} { set recommendations "" } else { append recommendations "
    " @@ -173,7 +173,7 @@ and c.${sub}category_id = :${sub}category_id)" } -set products "" +set products {
    } set have_how_many_more_p f set count 0 @@ -215,17 +215,17 @@ append products "
    " if { $start >= $how_many } { - set prev_link "Previous $how_many" + set prev_link "Previous $how_many" } else { set prev_link "" } if { $have_how_many_more_p == "t" } { - set next_link "Next $how_many" + set next_link "Next $how_many" } else { set number_of_remaining_products [expr $count - $start - $how_many] if { $number_of_remaining_products > 0 } { - set next_link "Next $number_of_remaining_products" + set next_link "<\"a href=[ad_conn url]?[export_url_vars category_id subcategory_id subsubcategory_id how_many]&start=[expr $start + $how_many]\">Next $number_of_remaining_products" } else { set next_link "" } @@ -251,7 +251,7 @@ order by sort_key, sub${sub}category_name" { append subcategories " -
  • [eval "ident \$sub${sub}category_name"]
  • " + > [eval "ident \$sub${sub}category_name"]
    " } } Index: openacs-4/packages/ecommerce/www/checkout-progress.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/Attic/checkout-progress.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/checkout-progress.adp 17 Sep 2002 03:37:50 -0000 1.1 +++ openacs-4/packages/ecommerce/www/checkout-progress.adp 8 Mar 2004 19:46:11 -0000 1.2 @@ -1,19 +1,19 @@ - +
    - - - - + + + + - - + + - - - - - + + + + +
    Select Shipping Address--->Verify Order--->class="altback">Select Shipping Addressclass="altback">--->class="altback">Verify Orderclass="altback">---> Select Shipping Method--->class="altback">Select Shipping Methodclass="altback">---> Select Billing Address--->Enter Payment Info--->Confirm Orderclass="altback">Select Billing Addressclass="altback">--->class="altback">Enter Payment Infoclass="altback">--->class="altback">Confirm Order
    Index: openacs-4/packages/ecommerce/www/contextbar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/Attic/contextbar.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/www/contextbar.adp 15 Nov 2003 06:48:11 -0000 1.2 +++ openacs-4/packages/ecommerce/www/contextbar.adp 8 Mar 2004 19:46:11 -0000 1.3 @@ -1 +1 @@ -
    @context_bar;noquote@ Administer ]
    +

    @context_bar;noquote@ Administer ]

    Index: openacs-4/packages/ecommerce/www/contextbar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/Attic/contextbar.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/contextbar.tcl 11 Dec 2003 21:40:02 -0000 1.4 +++ openacs-4/packages/ecommerce/www/contextbar.tcl 8 Mar 2004 19:46:11 -0000 1.5 @@ -18,11 +18,7 @@ if {[empty_string_p $context_addition]} { set context_bar [ad_context_bar] } else { - set cmd [list ad_context_bar --] - foreach elem $context_addition { - lappend cmd $elem - } - set context_bar [eval $cmd] + set context_bar [eval ad_context_bar $context_addition] } # Check for admin rights to this (the ecommerce) package. Index: openacs-4/packages/ecommerce/www/finalize-order.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/finalize-order.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/www/finalize-order.tcl 10 Dec 2002 20:06:18 -0000 1.6 +++ openacs-4/packages/ecommerce/www/finalize-order.tcl 8 Mar 2004 19:46:11 -0000 1.7 @@ -734,7 +734,7 @@ db_dml schedule_settlement " update ec_financial_transactions - set authorized_date = sysdate, to_be_capture_p = 't', to_be_captured_date = sysdate + set authorized_date = sysdate, to_be_captured_p = 't', to_be_captured_date = sysdate where transaction_id = :transaction_id" # Mark the transaction now, rather than waiting for Index: openacs-4/packages/ecommerce/www/gift-certificate-billing.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate-billing.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/gift-certificate-billing.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/gift-certificate-billing.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + gift-certificate
    Index: openacs-4/packages/ecommerce/www/gift-certificate-finalize-order-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate-finalize-order-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/gift-certificate-finalize-order-postgresql.xql 26 May 2002 04:36:50 -0000 1.4 +++ openacs-4/packages/ecommerce/www/gift-certificate-finalize-order-postgresql.xql 8 Mar 2004 19:46:11 -0000 1.5 @@ -74,7 +74,7 @@ insert into ec_problems_log (problem_id, problem_date, problem_details, gift_certificate_id) values - (ec_problem_id_sequence.nextval, sysdate, + (ec_problem_id_sequence.nextval, current_timestamp, 'Gift-certificate-finalize-order.tcl called payment gateway :payment_gateway for authorizion, which returned: :response_code.', :gift_certificate_id) Index: openacs-4/packages/ecommerce/www/gift-certificate-finalize-order.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate-finalize-order.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/gift-certificate-finalize-order.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/gift-certificate-finalize-order.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + gift-certificate @page;noquote@ Index: openacs-4/packages/ecommerce/www/gift-certificate-order-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate-order-2.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/gift-certificate-order-2.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/gift-certificate-order-2.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + gift-certificate
      Index: openacs-4/packages/ecommerce/www/gift-certificate-order-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate-order-3.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/gift-certificate-order-3.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/gift-certificate-order-3.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + gift-certificate @hidden_form_variables@ Index: openacs-4/packages/ecommerce/www/gift-certificate-order-4.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate-order-4.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/gift-certificate-order-4.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/gift-certificate-order-4.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + gift-certificate
      @@ -21,7 +22,7 @@ - Your Gift Certificate Order: + Your Gift Certificate Order: @to_row@ Index: openacs-4/packages/ecommerce/www/gift-certificate-order.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate-order.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/gift-certificate-order.adp 22 May 2003 14:48:11 -0000 1.4 +++ openacs-4/packages/ecommerce/www/gift-certificate-order.adp 8 Mar 2004 19:46:11 -0000 1.5 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + gift-certificate

      The perfect gift for anyone, gift certificates can be used to buy Index: openacs-4/packages/ecommerce/www/gift-certificate-thank-you.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate-thank-you.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/gift-certificate-thank-you.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/gift-certificate-thank-you.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + gift-certificate

      The lucky recipient will be notified by email shortly!

      @@ -12,7 +13,7 @@ Buy another gift certificate
    1. - Return to <%= [ad_system_name] %> + Return to <%= [ad_system_name] %>
    2. Index: openacs-4/packages/ecommerce/www/gift-certificate.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/gift-certificate.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/gift-certificate.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/gift-certificate.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,8 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t + gift-certificate
      @gift_certificate_summary@ Index: openacs-4/packages/ecommerce/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/index.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/index.adp 11 Dec 2003 21:40:02 -0000 1.4 +++ openacs-4/packages/ecommerce/www/index.adp 8 Mar 2004 19:46:11 -0000 1.5 @@ -2,7 +2,7 @@ Welcome @context_bar;noquote@ - + t
      Index: openacs-4/packages/ecommerce/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/index.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ecommerce/www/index.tcl 10 Dec 2002 20:06:18 -0000 1.5 +++ openacs-4/packages/ecommerce/www/index.tcl 8 Mar 2004 19:46:11 -0000 1.6 @@ -55,7 +55,7 @@ set search_widget "" } -set recommendations_if_there_are_any "" +set recommendations_if_there_are_any "
      " if [ad_parameter -package_id [ec_id] UserClassApproveP ecommerce] { set user_class_approved_p_clause "and user_class_approved_p = 't'" @@ -77,7 +77,7 @@ and r.active_p='t'" { append recommendations_if_there_are_any " -
      +
      " } -if {[string equal $recommendations_if_there_are_any "
      [ec_linked_thumbnail_if_it_exists $dirname "f" "t"] $product_name @@ -86,13 +86,13 @@ [ec_price_line $product_id $user_id $offer_code]
      "]} { +if {[string equal $recommendations_if_there_are_any "
      "]} { set recommendations_if_there_are_any "" } else { append recommendations_if_there_are_any "
      " } -set products "" +set products "
      " set have_how_many_more_p f set count 0 @@ -128,7 +128,7 @@ set have_how_many_more_p f } } -if {[string equal $products "
      "]} { +if {[string equal $products "
      "]} { set products "" } else { append products "
      " Index: openacs-4/packages/ecommerce/www/mailing-list-add-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/mailing-list-add-2.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/mailing-list-add-2.adp 26 Jan 2004 15:39:46 -0000 1.4 +++ openacs-4/packages/ecommerce/www/mailing-list-add-2.adp 8 Mar 2004 19:46:11 -0000 1.5 @@ -3,7 +3,7 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t
      To remove yourself anytime, go to @remove_link;noquote@ Index: openacs-4/packages/ecommerce/www/mailing-list-remove.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/mailing-list-remove.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/mailing-list-remove.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/mailing-list-remove.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,7 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t

      To re-add yourself anytime, go to @re_add_link@

      Index: openacs-4/packages/ecommerce/www/order.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/order.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/order.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/order.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,7 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t
      @order_summary@ Index: openacs-4/packages/ecommerce/www/payment.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/payment.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/payment.adp 22 May 2003 14:48:11 -0000 1.4 +++ openacs-4/packages/ecommerce/www/payment.adp 8 Mar 2004 19:46:11 -0000 1.5 @@ -28,8 +28,10 @@ +

      Click here to claim a new gift certificate

      +

      Since we already have a credit card on file for you, you Index: openacs-4/packages/ecommerce/www/payment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/payment.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/ecommerce/www/payment.tcl 10 Dec 2002 20:06:18 -0000 1.9 +++ openacs-4/packages/ecommerce/www/payment.tcl 8 Mar 2004 19:46:11 -0000 1.10 @@ -99,7 +99,7 @@ select count(*) from ec_items where order_id=:order_id"] == 0 } { - rp_internal_redirect shopping-cart + ad_returnredirect shopping-cart ad_script_abort } @@ -227,6 +227,8 @@ append old_cards_to_choose_from "" } +set gift_certificate_p [ad_parameter -package_id [ec_id] SellGiftCertificatesP ecommerce] + 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 Index: openacs-4/packages/ecommerce/www/product-search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/product-search.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/product-search.adp 26 Jan 2004 15:39:46 -0000 1.4 +++ openacs-4/packages/ecommerce/www/product-search.adp 8 Mar 2004 19:46:11 -0000 1.5 @@ -3,7 +3,7 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t

      @search_results;noquote@ Index: openacs-4/packages/ecommerce/www/product.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/product.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/product.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/product.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,6 +3,6 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t @formatted_product;noquote@ Index: openacs-4/packages/ecommerce/www/review-submit-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/review-submit-2.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/review-submit-2.adp 22 May 2003 14:48:11 -0000 1.4 +++ openacs-4/packages/ecommerce/www/review-submit-2.adp 8 Mar 2004 19:46:11 -0000 1.5 @@ -3,7 +3,7 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t
      Index: openacs-4/packages/ecommerce/www/review-submit-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/review-submit-3.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/review-submit-3.adp 22 May 2003 14:48:11 -0000 1.3 +++ openacs-4/packages/ecommerce/www/review-submit-3.adp 8 Mar 2004 19:46:11 -0000 1.4 @@ -3,7 +3,7 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t
      Index: openacs-4/packages/ecommerce/www/review-submit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/review-submit.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ecommerce/www/review-submit.adp 22 May 2003 14:48:11 -0000 1.5 +++ openacs-4/packages/ecommerce/www/review-submit.adp 8 Mar 2004 19:46:11 -0000 1.6 @@ -3,7 +3,7 @@ @context_bar;noquote@ @ec_system_owner;noquote@ - + t @@ -17,7 +17,7 @@
    3. Enter your review below: (maximum of 1,000 words)

      - +