Index: openacs-4/packages/ecommerce/www/admin/products/add-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/add-3.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/products/add-3.adp 13 Aug 2008 12:16:57 -0000 1.1 @@ -0,0 +1,170 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +

Please confirm that the information below is correct:

+
+
+ +
+
+@linked_thumbnail;noquote@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@custom_product_fields_select_html;noquote@ + + + +
+Product Name: + +@product_name;noquote@ +
+SKU: + +@sku@ +
+Categorization: + +@categorization_html;noquote@ +
+ Stock Status: + @stock_status_html;noquote@ +
+ Regular Price: + + @price_html@ +
+ Shipping Price + +@shipping_html@ +
+ Shipping - Additional + + +@shipping_additional_html@ +
+One-Line Description: + +@one_line_description_html;noquote@ +
+Additional Descriptive Text: + +@detailed_description_html;noquote@ +
+Search Keywords: + +@search_keywords_html@ +
+Color Choices: + +@color_list_html;noquote@ +
+Size Choices: + +@size_list_html;noquote@ +
+Style Choices: + +@style_list_html;noquote@ +
+Email On Purchase: + +@email_on_purchase_list_html@ +
+URL: + +@url_html@ +
+Is this product shippable? + +@no_shipping_avail_p_html@ +
+Display this product when user does a search? + +@present_p_html@ +
+Weight + +@weight_html@ +
+Template + +@template_html;noquote@ +
+
+

+@export_form_vars_html;noquote@ + +@custom_fields_select_html;noquote@ + +@user_class_select_html;noquote@ +

+ +
+
+ Index: openacs-4/packages/ecommerce/www/admin/products/add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/add-3.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/www/admin/products/add-3.tcl 9 Mar 2004 00:59:51 -0000 1.4 +++ openacs-4/packages/ecommerce/www/admin/products/add-3.tcl 13 Aug 2008 12:16:57 -0000 1.5 @@ -51,265 +51,84 @@ # and all active custom fields (except ones that are boolean and weren't filled in) # and price$user_class_id for all the user classes # category_id_list, subcategory_id_list, subsubcategory_id_list +set title "Confirm New Product" +set context [list $title] -doc_body_append "[ad_admin_header "Confirm New Product"] -

Confirm New Product

+set currency [parameter::get -package_id [ec_id] -parameter Currency] +set multiple_retailers_p [parameter::get -package_id [ec_id] -parameter MultipleRetailersPerProductP -default f] -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index" "Products"] "Add Product"] +set categorization_html [ec_category_subcategory_and_subsubcategory_display $category_id_list $subcategory_id_list $subsubcategory_id_list] -
-

Please confirm that the information below is correct:

-" -set currency [ad_parameter -package_id [ec_id] Currency ecommerce] -set multiple_retailers_p [ad_parameter -package_id [ec_id] MultipleRetailersPerProductP ecommerce] - -doc_body_append "
-
- -
-
-$linked_thumbnail - - - - - - - - - - - - - -" if { !$multiple_retailers_p } { - doc_body_append " - - - - " + set price_html [ec_message_if_null [ec_pretty_price $price $currency]] + set shipping_html [ec_message_if_null [ec_pretty_price $shipping $currency]] + set shipping_additional_html [ec_message_if_null [ec_pretty_price $shipping_additional $currency]] } -doc_body_append " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" -if { !$multiple_retailers_p } { - doc_body_append " - - - - " -} -doc_body_append " - - - - - - - -" -if { !$multiple_retailers_p } { - doc_body_append " - - - - - - - - " -} -doc_body_append " - - - -" -if { !$multiple_retailers_p } { - db_foreach user_class_select "select user_class_id, user_class_name from ec_user_classes order by user_class_name" { + +set user_class_select_html "" +db_foreach user_class_select "select user_class_id, user_class_name from ec_user_classes order by user_class_name" { if { [info exists user_class_prices($user_class_id)] } { - doc_body_append " - - - - - " + " } - } } +set one_line_description_html [ec_message_if_null $one_line_description] +set detailed_description_html [ec_display_as_html [ec_message_if_null $detailed_description]] +set search_keywords_html [ec_message_if_null $search_keywords] +set color_list_html [ec_message_if_null $color_list] +set size_list_html [ec_message_if_null $size_list] +set style_list_html [ec_message_if_null $style_list] +set email_on_purchase_list_html [ec_message_if_null $email_on_purchase_list] +set url_html [ec_message_if_null $url] +set no_shipping_avail_p_html [ec_message_if_null [ec_PrettyBoolean [ec_decode $no_shipping_avail_p "t" "f" "f" "t"]]] +set present_p_html [ec_message_if_null [ec_PrettyBoolean $present_p]] + +set weight_html "[ec_message_if_null $weight] [ec_decode $weight "" "" [parameter::get -package_id [ec_id] -parameter WeightUnits -default lbs]]" + +set custom_product_fields_select_html "" db_foreach custom_fields_select { - select field_identifier, field_name, column_type - from ec_custom_product_fields - where active_p = 't' + select field_identifier, field_name, column_type + from ec_custom_product_fields + where active_p = 't' } { - if { [info exists ec_custom_fields($field_identifier)] } { - doc_body_append " - - - " } - doc_body_append " - - " - } } -doc_body_append " - - - -
-Product Name: - -$product_name -
-SKU: - -$sku -
-Categorization: - -[ec_category_subcategory_and_subsubcategory_display $category_id_list $subcategory_id_list $subsubcategory_id_list] -
- Stock Status: - - " if { ![empty_string_p $stock_status] } { - doc_body_append [util_memoize "ad_parameter -package_id [ec_id] \"StockMessage[string toupper $stock_status]\"" [ec_cache_refresh]] + set stock_status_html [util_memoize "ad_parameter -package_id [ec_id] \"StockMessage[string toupper $stock_status]\"" [ec_cache_refresh]] } else { - doc_body_append [ec_message_if_null $stock_status] + set stock_status_html [ec_message_if_null $stock_status] } - - doc_body_append "
-One-Line Description: - -[ec_message_if_null $one_line_description] -
-Additional Descriptive Text: - -[ec_display_as_html [ec_message_if_null $detailed_description]] -
-Search Keywords: - -[ec_message_if_null $search_keywords] -
-Color Choices: - -[ec_message_if_null $color_list] -
-Size Choices: - -[ec_message_if_null $size_list] -
-Style Choices: - -[ec_message_if_null $style_list] -
-Email On Purchase: - -[ec_message_if_null $email_on_purchase_list] -
-URL: - -[ec_message_if_null $url] -
- Regular Price: - - [ec_message_if_null [ec_pretty_price $price $currency]] -
-Is this product shippable? - -[ec_message_if_null [ec_PrettyBoolean [ec_decode $no_shipping_avail_p "t" "f" "f" "t"]]] -
-Display this product when user does a search? - -[ec_message_if_null [ec_PrettyBoolean $present_p]] -
- Shipping Price - - [ec_message_if_null [ec_pretty_price $shipping $currency]] -
- Shipping - Additional - - [ec_message_if_null [ec_pretty_price $shipping_additional $currency]] -
-Weight - -[ec_message_if_null $weight] [ec_decode $weight "" "" [ad_parameter -package_id [ec_id] WeightUnits ecommerce]] -
- $user_class_name Price: - + append user_class_select_html " +
${user_class_name} Price: [ec_message_if_null [ec_pretty_price [set user_class_prices($user_class_id)] $currency]] -
- $field_name - - " - if { $column_type == "char(1)" } { - doc_body_append "[ec_message_if_null [ec_PrettyBoolean $ec_custom_fields($field_identifier)]]\n" - } elseif { $column_type == "date" } { - doc_body_append "[ec_message_if_null [util_AnsiDatetoPrettyDate $ec_custom_fields($field_identifier)]]\n" - } else { - doc_body_append "[ec_display_as_html [ec_message_if_null $ec_custom_fields($field_identifier)]]\n" + if { [info exists ec_custom_fields($field_identifier)] } { + append custom_product_fields_select_html "
$field_name" + if { $column_type == "char(1)" } { + append custom_product_fields_select_html "[ec_message_if_null [ec_PrettyBoolean $ec_custom_fields($field_identifier)]]\n" + } elseif { $column_type == "date" } { + append custom_product_fields_select_html "[ec_message_if_null [util_AnsiDatetoPrettyDate $ec_custom_fields($field_identifier)]]\n" + } else { + append custom_product_fields_select_html "[ec_display_as_html [ec_message_if_null $ec_custom_fields($field_identifier)]]\n" + } + append custom_product_fields_select_html "
-Template - -[ec_message_if_null [db_string template_name_select "select template_name from ec_templates where template_id=:template_id" -default "" ]] -
-
-

-[export_form_vars product_name sku category_id_list subcategory_id_list subsubcategory_id_list one_line_description detailed_description color_list size_list style_list email_on_purchase_list search_keywords url price no_shipping_avail_p present_p available_date shipping shipping_additional weight template_id product_id dirname stock_status] -" +set template_html [ec_message_if_null [db_string template_name_select "select template_name from ec_templates where template_id=:template_id" -default "" ]] +set export_form_vars_html [export_form_vars product_name sku category_id_list subcategory_id_list subsubcategory_id_list one_line_description detailed_description color_list size_list style_list email_on_purchase_list search_keywords url price no_shipping_avail_p present_p available_date shipping shipping_additional weight template_id product_id dirname stock_status] # also need to export custom field values +set custom_fields_select_html "" db_foreach custom_fields_select { - select field_identifier - from ec_custom_product_fields - where active_p='t' + select field_identifier + from ec_custom_product_fields + where active_p='t' } { if { [info exists ec_custom_fields($field_identifier)] } { - doc_body_append "\n" + append custom_fields_select_html "\n" } } - +set user_class_select_html "" foreach user_class_id [db_list user_class_select "select user_class_id from ec_user_classes"] { - doc_body_append "" + append user_class_select_html "" } -doc_body_append "

- -
-
- -[ad_admin_footer] -"