Index: openacs-4/packages/ecommerce/www/admin/shipping-costs/edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/shipping-costs/edit.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/shipping-costs/edit.adp 18 Aug 2008 12:51:28 -0000 1.1 @@ -0,0 +1,15 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

Please confirm that you want shipping to be charged as follows:

+@shipping_costs_html;noquote@ + +
+ @export_form_vars_html;noquote@ + +
+ +
+
Index: openacs-4/packages/ecommerce/www/admin/shipping-costs/edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/shipping-costs/edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/shipping-costs/edit.tcl 9 Mar 2004 00:59:53 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/shipping-costs/edit.tcl 18 Aug 2008 12:51:28 -0000 1.4 @@ -24,8 +24,6 @@ ns_set print [ns_getform] -# - # error checking: # anything on this page can be blank (if *everything* is blank, it means # that the shipping costs are included in the costs of the items, which @@ -41,105 +39,85 @@ if { [info exists base_shipping_cost] && ![empty_string_p $base_shipping_cost]} { if {![regexp {^[0-9|.]+$} $base_shipping_cost]} { - incr exception_count - append exception_text "
  • The Base Cost must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Base Cost must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } if {[regexp {^[.]$} $base_shipping_cost]} { - incr exception_count - append exception_text "
  • The Base Cost must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Base Cost must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } } if { [info exists default_shipping_per_item] && ![empty_string_p $default_shipping_per_item]} { if {![regexp {^[0-9|.]+$} $default_shipping_per_item]} { - incr exception_count - append exception_text "
  • The Default Amount Per Item must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Default Amount Per Item must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } if {[regexp {^[.]$} $default_shipping_per_item]} { - incr exception_count - append exception_text "
  • The Default Amount Per Item must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Default Amount Per Item must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } } if { [info exists weight_shipping_cost] && ![empty_string_p $weight_shipping_cost]} { if {![regexp {^[0-9|.]+$} $weight_shipping_cost]} { - incr exception_count - append exception_text "
  • The Weight Charge must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Weight Charge must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } if {[regexp {^[.]$} $weight_shipping_cost]} { - incr exception_count - append exception_text "
  • The Weight Charge must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Weight Charge must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } } if { [info exists add_exp_base_shipping_cost] && ![empty_string_p $add_exp_base_shipping_cost]} { if {![regexp {^[0-9|.]+$} $add_exp_base_shipping_cost]} { - incr exception_count - append exception_text "
  • The Additional Base Cost must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Additional Base Cost must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } if {[regexp {^[.]$} $add_exp_base_shipping_cost] } { - incr exception_count - append exception_text "
  • The Additional Base Cost must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Additional Base Cost must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } } if { [info exists add_exp_amount_per_item] && ![empty_string_p $add_exp_amount_per_item]} { if {![regexp {^[0-9|.]+$} $add_exp_amount_per_item]} { - incr exception_count - append exception_text "
  • Additional Amount Per Item must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • Additional Amount Per Item must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } if {[regexp {^[.]$} $add_exp_amount_per_item] } { - incr exception_count - append exception_text "
  • Additional Amount Per Item must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • Additional Amount Per Item must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } } if { [info exists add_exp_amount_by_weight] && ![empty_string_p $add_exp_amount_by_weight]} { if {![regexp {^[0-9|.]+$} $add_exp_amount_by_weight]} { - incr exception_count - append exception_text "
  • The Additional Amount by Weight must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Additional Amount by Weight must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } if {[regexp {^[.]$} $add_exp_amount_by_weight] } { - incr exception_count - append exception_text "
  • The Additional Amount by Weight must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point." + incr exception_count + append exception_text "
  • The Additional Amount by Weight must be a number (like 4.95). It cannot contain any other characters than numerals or a decimal point.
  • " } } if { [info exists default_shipping_per_item] && ![empty_string_p $default_shipping_per_item] && [info exists weight_shipping_cost] && ![empty_string_p $weight_shipping_cost]} { incr exception_count - append exception_text "
  • You can't fill in both Default Amount Per Item and Weight Charge. Please choose one or the other (the method you choose will be used to determine the shipping price if the price isn't explicitly set in the \"Shipping Price\" field)." + append exception_text "
  • Please fill in either Default Amount Per Item or Weight Charge, but not both. The method you choose will be used to determine the shipping price if the price isn't explicitly set in the \"Shipping Price\" field).
  • " } if { $exception_count > 0 } { ad_return_complaint $exception_count $exception_text return } - # error checking done +set title "Confirm Shipping Costs" +set context [list [list index "Shipping Costs"] $title] -set page_html "[ad_admin_header "Confirm Shipping Costs"] +set shipping_costs_html "[ec_shipping_cost_summary $base_shipping_cost $default_shipping_per_item $weight_shipping_cost $add_exp_base_shipping_cost $add_exp_amount_per_item $add_exp_amount_by_weight]" -

    Confirm Shipping Costs

    +set export_form_vars_html [export_form_vars base_shipping_cost default_shipping_per_item weight_shipping_cost add_exp_base_shipping_cost add_exp_amount_per_item add_exp_amount_by_weight] -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Shipping Costs"] "Edit"] - -
    - -Please confirm that you want shipping to be charged as follows: - -
    -[ec_shipping_cost_summary $base_shipping_cost $default_shipping_per_item $weight_shipping_cost $add_exp_base_shipping_cost $add_exp_amount_per_item $add_exp_amount_by_weight] -
    - -
    -[export_form_vars base_shipping_cost default_shipping_per_item weight_shipping_cost add_exp_base_shipping_cost add_exp_amount_per_item add_exp_amount_by_weight] - -
    - -
    -
    - -[ad_admin_footer] -" -doc_return 200 text/html $page_html Index: openacs-4/packages/ecommerce/www/admin/shipping-costs/examples.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/shipping-costs/examples.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/shipping-costs/examples.adp 18 Aug 2008 12:51:28 -0000 1.1 @@ -0,0 +1,36 @@ + + @title;noquote@ + @context;noquote@ +

    @title@

    + + Index: openacs-4/packages/ecommerce/www/admin/shipping-costs/examples.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/shipping-costs/examples.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/shipping-costs/examples.tcl 9 Mar 2004 00:59:53 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/shipping-costs/examples.tcl 18 Aug 2008 12:51:28 -0000 1.4 @@ -10,81 +10,16 @@ ad_require_permission [ad_conn package_id] admin -set page_html "[ad_admin_header "Shipping Cost Examples"] +set title "Examples" +set context [list [list index "Shipping Costs"] $title] -

    Shipping Cost Examples

    -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Shipping Costs"] "Some Examples"] -
    - - -[ad_admin_footer] -" - -doc_return 200 text/html $page_html - - - - - - - - - Index: openacs-4/packages/ecommerce/www/admin/shipping-costs/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/shipping-costs/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/shipping-costs/index.adp 18 Aug 2008 12:51:28 -0000 1.1 @@ -0,0 +1,69 @@ + + @title;noquote@ + @context;noquote@ +

    @title@

    + +

    Your Current Settings

    + +

    +@shipping_costs_html;noquote@ +

    + +

    Change Your Settings

    + +

    +All prices are in @currency@. The price should +be written as a decimal number (no special characters like \$). If a +section is not applicable, just leave it blank. +

    +

    +We recommend reading some examples before you fill in this form. +

    + +
    +
      + +
    1. Set the Base Cost: + +The Base Cost is the base amount that everybody has to pay regardless of +what they purchase. Then additional amounts are added, as specified below. +
    2. + +
    3. Set the Per-Item Cost: +If the "Shipping Price" field of a product is filled in, that will +override any of the settings below. Also, you can fill in the +"Shipping Price - Additional" field if you want to charge the +customer a lower shipping amount if they order more than one of the +same product. (If "Shipping Price - Additional" is blank, they'll +just be charged "Shipping Price" for each item). +
        +If the "Shipping Price" field is blank, charge them by one of +these methods (fill in only one): +
      • Default Amount Per Item: +
      • +
      • Weight Charge: +@currency@ / @weight_unit@ +
    4. + +
    5. Set the Express Shipping Charges: +Ignore this section if you do not do express shipping. The amounts you specify below will be added to the amounts you set above if the user elects to have their order express shipped. +
        +
      • Additional Base Cost:
      • +
      • Additional Amount Per Item:
      • +
    6. + +
    7. Additional Amount by Weight: + +@currency@ / @weight_unit@
    8. + +
    + +
    + +
    +
    + +

    Audit Trail

    + Index: openacs-4/packages/ecommerce/www/admin/shipping-costs/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/shipping-costs/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/admin/shipping-costs/index.tcl 9 Mar 2004 00:59:53 -0000 1.4 +++ openacs-4/packages/ecommerce/www/admin/shipping-costs/index.tcl 18 Aug 2008 12:51:28 -0000 1.5 @@ -10,145 +10,17 @@ ad_require_permission [ad_conn package_id] admin -set page_html "[ad_admin_header "Shipping Costs"] +set title "Shipping Costs" +set context [list $title] -

    Shipping Costs

    - -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] "Shipping Costs"] - -
    - -

    Your Current Settings

    - -

    -

    -" # for audit table set table_names_and_id_column [list ec_admin_settings ec_admin_settings_audit admin_setting_id ] - db_1row get_shipping_costs "select base_shipping_cost, default_shipping_per_item, weight_shipping_cost, add_exp_base_shipping_cost, add_exp_amount_per_item, add_exp_amount_by_weight from ec_admin_settings" +set shipping_costs_html "[ec_shipping_cost_summary $base_shipping_cost $default_shipping_per_item $weight_shipping_cost $add_exp_base_shipping_cost $add_exp_amount_per_item $add_exp_amount_by_weight]" - append page_html "[ec_shipping_cost_summary $base_shipping_cost $default_shipping_per_item $weight_shipping_cost $add_exp_base_shipping_cost $add_exp_amount_per_item $add_exp_amount_by_weight] - -
    - -

    - -

    Change Your Settings

    - -

    -

    - -All prices are in [ad_parameter -package_id [ec_id] Currency ecommerce]. The price should -be written as a decimal number (no special characters like \$). If a -section is not applicable, just leave it blank. - -

    - -It is recommended that you read some -examples before you fill in this form. - -

    - -

      - -
      - -
    1. Set the Base Cost: - - -

      - -The Base Cost is the base amount that everybody has to pay regardless of -what they purchase. Then additional amounts are added, as specified below. - -

      - -

    2. Set the Per-Item Cost: - -If the \"Shipping Price\" field of a product is filled in, that will -override any of the settings below. Also, you can fill in the -\"Shipping Price - Additional\" field if you want to charge the -customer a lower shipping amount if they order more than one of the -same product. (If \"Shipping Price - Additional\" is blank, they'll -just be charged \"Shipping Price\" for each item). - -

      - -If the \"Shipping Price\" field is blank, charge them by one of -these methods (fill in only one): - -

      - -

        - -
      • Default Amount Per Item: - - -

        - -

      • - -Weight Charge: -[ad_parameter -package_id [ec_id] Currency ecommerce] -/ -[ad_parameter -package_id [ec_id] WeightUnits ecommerce] - -
      - -

      - -

    3. Set the Express Shipping Charges: - -

      - -Ignore this section if you do not do express shipping. The amounts you specify below will be added to the amounts you set above if the user elects to have their order express shipped. - -

      - -

        - -
      • Additional Base Cost: - -

        - -

      • Additional Amount Per Item: - -

        - -

      • - -Additional Amount by Weight: - -[ad_parameter -package_id [ec_id] Currency ecommerce] -/ -[ad_parameter -package_id [ec_id] WeightUnits ecommerce] - -
      - -
    - -
    - -
    - - - -
    - -

    Audit Trail

    - - - -[ad_admin_footer] -" - - - - -doc_return 200 text/html $page_html +set currency [parameter::get -package_id [ec_id] -parameter Currency -default "USD"] +set weight_unit [parameter::get -package_id [ec_id] -parameter WeightUnits -default "lbs"] +set audit_url_html "[ec_url_concat [ec_url] /admin]/audit-tables?[export_url_vars table_names_and_id_column]"