Index: openacs-4/packages/ecommerce/www/admin/customer-service/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/index.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/ecommerce/www/admin/customer-service/index.tcl 9 Mar 2004 00:59:47 -0000 1.4 +++ openacs-4/packages/ecommerce/www/admin/customer-service/index.tcl 12 Feb 2005 23:07:10 -0000 1.4.2.1 @@ -12,37 +12,31 @@ append doc_body "[ad_admin_header "Customer Service Administration"] -

Customer Service Administration

+

Customer Service Issues

-[ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] "Customer Service Administration"] +[ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] "Customer Service"] -
+
- -

Customer Service Issues

- - -

+append doc_body "

Search for customer

-

Customers

- - +

Administrative Actions

[ad_admin_footer] Index: openacs-4/packages/ecommerce/www/admin/customer-service/interaction-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/interaction-add-2.tcl,v diff -u -r1.6 -r1.6.2.1 --- openacs-4/packages/ecommerce/www/admin/customer-service/interaction-add-2.tcl 9 Mar 2004 00:59:47 -0000 1.6 +++ openacs-4/packages/ecommerce/www/admin/customer-service/interaction-add-2.tcl 12 Feb 2005 23:07:10 -0000 1.6.2.1 @@ -87,7 +87,7 @@ append exception_text "
  • You forgot to specify the method of inquiry (phone/email/etc.).\n" } elseif { $interaction_type == "other" && (![info exists interaction_type_other] || [empty_string_p $interaction_type_other]) } { incr exception_count - append exception_text "
  • You forgot to fill in the text box for Other.\n" + append exception_text "
  • You forgot to fill in the text box detail for Other.\n" } elseif { $interaction_type != "other" && ([info exists interaction_type_other] && ![empty_string_p $interaction_type_other]) } { incr exception_count append exception_text "
  • You selected \"Inquired via: [string toupper [string index $interaction_type 0]][string range $interaction_type 1 [expr [string length $interaction_type] -1]]\", but you also filled in something in the \"If Other, specify\" field. This is inconsistent.\n" @@ -113,102 +113,16 @@ -append doc_body "[ad_admin_header "One Issue"] +append doc_body "[ad_admin_header "One Issue"]

    One Issue

    - [ad_context_bar [list "../index.tcl" "Ecommerce([ec_system_name])"] [list "index.tcl" "Customer Service Administration"] "One Issue (part of New Interaction)"] -
    -A customer may discuss several issues during the course of one interaction. Please -enter the information about only one issue below: +
    " -
    -[export_form_vars interaction_id c_user_identification_id action_id open_date_str interaction_type interaction_type_other interaction_originator first_names last_name email postal_code other_id_info return_to_issue insert_id] - - -" - -if { [info exists c_user_identification_id] } { - append doc_body " - - - - " -} - -if { ![info exists issue_id] } { - append doc_body " - - - - - - - - - - - - " -} else { - set order_id [db_string get_order_id "select order_id from ec_customer_service_issues where issue_id=:issue_id"] - set issue_type_list [db_list get_issue_type_list "select issue_type from ec_cs_issue_type_map where issue_id=:issue_id"] - - append doc_body " - - - - - - - - - - - - " -} -append doc_body " - - - - - - - - - - - - - - - -
    Customer:[ec_user_identification_summary $c_user_identification_id "t"]" - - if { [info exists postal_code] } { - append doc_body "
    - [ec_location_based_on_zip_code $postal_code] - " - } - - append doc_body "
    Issue ID: - If this is a new issue, please leave this blank (a new Issue ID will be generated)
    Order ID: - Fill this in if this inquiry is about a specific order. -
    Issue Type: (leave blank if based on an existing issue):[ec_issue_type_widget]
    Issue ID:$issue_id[export_form_vars issue_id]
    Order ID:[ec_decode $order_id "" "none" $order_id]
    Issue Type[join $issue_type_list ", "]
    Details:
    Information used to respond to inquiry:[ec_info_used_widget]
    If follow-up is required, please specify:
    Close this issue? -No (Issue requires follow-up) -Yes (Issue is resolved) -
    -" - if { ![info exists c_user_identification_id] } { append doc_body " +

    Customer identification:

    - - Customer identification: - -

    - Here's what we could determine about the customer given the information you typed into the previous form:

    -

    + append doc_body "" +} + +append doc_body "

    One issue

    A customer may discuss several issues during the course of one interaction. Please +enter the information about only one issue below:

    + + +[export_form_vars interaction_id c_user_identification_id action_id open_date_str interaction_type interaction_type_other interaction_originator first_names last_name email postal_code other_id_info return_to_issue insert_id] + +" + +if { [info exists c_user_identification_id] } { + append doc_body " + + + " +} + +if { ![info exists issue_id] } { + append doc_body " + + + + + + + + + + + " +} else { + set order_id [db_string get_order_id "select order_id from ec_customer_service_issues where issue_id=:issue_id"] + set issue_type_list [db_list get_is` + + + + + + + + + + + +" } +append doc_body " + + + + + + + + + + + + -[ad_admin_footer] + + +
    Customer:[ec_user_identification_summary $c_user_identification_id "t"]" + + if { [info exists postal_code] } { + append doc_body "
    + [ec_location_based_on_zip_code $postal_code]" + } + + append doc_body "
    Previous Issue ID: + If this is a new issue, please leave this blank (a new Issue ID will be generated)
    New Issue Type: (leave blank if based on an existing issue) [ec_issue_type_widget]
    Order ID: + Fill this in if this inquiry is about a specific order. +
    Issue ID:$issue_id[export_form_vars issue_id]
    Issue Type[join $issue_type_list ", "]
    Order ID:[ec_decode $order_id "" "none" $order_id]
    Issue details:
    (action_details)
    Resources used:Information used to respond to inquiry [ec_info_used_widget]
    Requires follow-up? +yes requires follow-up
    +    Please elaborate: -append doc_body "
    - - -
    +
    no (resolved)
    " +append doc_body "
    Customer + + +
    + +[ad_admin_footer] +" doc_return 200 text/html $doc_body Index: openacs-4/packages/ecommerce/www/admin/customer-service/interaction-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/interaction-add-3.tcl,v diff -u -r1.6 -r1.6.2.1 --- openacs-4/packages/ecommerce/www/admin/customer-service/interaction-add-3.tcl 9 Mar 2004 00:59:47 -0000 1.6 +++ openacs-4/packages/ecommerce/www/admin/customer-service/interaction-add-3.tcl 12 Feb 2005 23:07:10 -0000 1.6.2.1 @@ -25,7 +25,7 @@ @param {follow_up_required "f"} @param {info_used_list ""} @param submit - @param return_to_issue + @param return_to_issue @author @creation-date @@ -56,15 +56,16 @@ {follow_up_required "f"} {info_used_list ""} submit + issue_id:optional,naturalnum } ad_require_permission [ad_conn package_id] admin # doubleclick protection: if { [db_string get_service_action_count "select count(*) from ec_customer_service_actions where action_id=:action_id"] > 0 } { - if { $submit == "Interaction Complete" } { - ad_returnredirect interaction-add.tcl - } else { +ns_log Notice "interaction-add-3.tcl: double click protection, line 65" + ad_returnredirect index +} elseif { $submit != "Interaction complete" } { # I have to use the action_id to figure out user_identification_id # and interaction_id so that I can pass them to interaction-add-2.tcl set row_exists_p [db_0or1row get_user_id_info "select i.user_identification_id as c_user_identification_id, a.interaction_id @@ -73,8 +74,6 @@ and a.action_id=:action_id"] set insert_id 1 ad_returnredirect "interaction-add-2.tcl?[export_url_vars interaction_id interaction_type postal_code c_user_identification_id insert_id interaction_originator]" - } - ad_script_abort } # the customer service rep must be logged on @@ -111,11 +110,9 @@ if { [info exists order_id] && [regexp "\[^0-9\]+" $order_id] } { incr exception_count - append exception_text "
  • The order ID should be numeric.\n" + append exception_text "
  • The Order ID should be numeric.\n" } - - if { $exception_count > 0 } { ad_return_complaint $exception_count $exception_text ad_script_abort @@ -131,14 +128,14 @@ # user with the interaction based on issue_id or order_id. # Otherwise, the user_identification_id is set, so they will just be # given an error message. -if { ![empty_string_p $issue_id] } { +if { [value_if_exists issue_id] > 0 } { # see who this issue belongs to if { [db_0or1row get_user_issue_id_info "select u.user_id as issue_user_id, u.user_identification_id as issue_user_identification_id from ec_user_identification u, ec_customer_service_issues i where u.user_identification_id = i.user_identification_id and i.issue_id=:issue_id"]==0 } { - ad_return_complaint 1 "
  • The issue ID that you specified is invalid. Please go back and check the issue ID you entered. If this is a new issue, please leave the issue ID blank.\n" + ad_return_complaint 1 "
  • The Issue ID that you specified is invalid. Please go back and check the Issue ID you entered. If this is a new issue, please leave the issue ID blank.\n" ad_script_abort } @@ -238,7 +235,7 @@ # see who the order belongs to set row_exists_p [db_0or1row get_order_owner "select user_id as order_user_id from ec_orders where order_id=:order_id"] if { $row_exists_p==0 } { - ad_return_complaint 1 "
  • The order ID that you specified is invalid. Please go back and check the order ID you entered. If this issue is not about a specific order, please leave the order ID blank.\n" + ad_return_complaint 1 "
  • The shopping cart Order ID that you specified is invalid. Please go back and check the order ID you entered. If this issue is not about a specific online order, please leave the Order ID blank.\n" ad_script_abort } @@ -447,9 +444,9 @@ } -if { $submit == "Interaction Complete" } { - if { ![info exists return_to_issue] } { - ad_returnredirect interaction-add +if { $submit == "Interaction complete" } { + if {[value_if_exists return_to_issue] < 1 } { + ad_returnredirect index } else { ad_returnredirect "issue?issue_id=$return_to_issue" } @@ -461,7 +458,3 @@ ad_returnredirect "interaction-add-2?[export_url_vars interaction_id interaction_type postal_code return_to_issue insert_id interaction_originator]&c_user_identification_id=$uiid_to_insert" } - - - -