Index: openacs-4/packages/ecommerce/www/admin/products/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/one.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/products/one.adp 14 Aug 2008 09:30:53 -0000 1.1 @@ -0,0 +1,211 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ + + +

Complete Record

+ Edit This Item + +
+ +

This product is discontinued.

+
+ +@linked_thumbnail_html;noquote@ + + + + + + + + + + + + + + + @price_row;noquote@ + @no_shipping_avail_p_row;noquote@ + @active_p_row;noquote@ + + + + + + + +@stock_status_html;noquote@ + + + + + + + + + + + + + + + + +@user_class_select_html;noquote@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@custom_fields_iteration_html;noquote@ + + + + + + + + + + + + + + + + + +
+ Product ID: + + @product_id@ +
+ Product Name: + + @product_name;noquote@ +
+ SKU: + + @sku_html@ +
+ Categorization: + + @categorization_html;noquote@ +
Stock Status:@stock_status_html;noquote@ +
Shipping Price:@shipping_html;noquote@
Shipping - Additional:@shipping_additional_html;noquote@
+ 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;noquote@ +
+ URL: + + @url_html;noquote@ +
+ Display this product when user does a search? + + @present_p_html@ +
Weight:@weight_html;noquote@
+ Template: + + @template_html;noquote@ +
+ Date Added: + + @date_added_html;noquote@ +
+ Date Available: + + @date_available_html;noquote@ +
+ Directory Name (where image & other product info is kept): + + @dirname_cell;noquote@ +
+ + +
+ + + Index: openacs-4/packages/ecommerce/www/admin/products/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/one.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/www/admin/products/one.tcl 9 Mar 2004 04:58:52 -0000 1.6 +++ openacs-4/packages/ecommerce/www/admin/products/one.tcl 14 Aug 2008 09:30:53 -0000 1.7 @@ -134,179 +134,19 @@ set dirname_cell "$dirname (Supporting Files)" } -doc_body_append " - [ad_admin_header "$product_name"] +set title $product_name +set context [list $title] -

$product_name

- - [ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Products"] "One Product"] +set export_product_id_var [export_url_vars product_id] -
+set linked_thumbnail_html [ec_linked_thumbnail_if_it_exists $dirname] - -

Complete Record

- Edit This Item - -
" - -if { $active_p == "f" } { - doc_body_append "

This product is discontinued.

" -} - -doc_body_append " - [ec_linked_thumbnail_if_it_exists $dirname] - - - - - - - - - - - - - - $price_row - $no_shipping_avail_p_row - $active_p_row - - - - " - if { !$multiple_retailers_p } { - doc_body_append " - - - - " -} - -doc_body_append " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" - -if { !$multiple_retailers_p } { - doc_body_append " - - - - - - - - " -} - -doc_body_append " - - - - " - -if { !$multiple_retailers_p } { - + set user_class_select_html "" db_foreach user_class_select " select user_class_id, user_class_name from ec_user_classes @@ -318,88 +158,60 @@ where product_id = :product_id and user_class_id = :user_class_id" -default ""] - doc_body_append " + append user_class_select_html " " } -} +} else { + + set stock_status_html [ec_message_if_null $stock_status] + +} +set export_product_id_name_var [export_url_vars product_id product_name] +set custom_fields_iteration_html "" db_foreach custom_fields_iteration " select field_identifier, field_name, column_type from ec_custom_product_fields where active_p = 't'" { if { [info exists $field_identifier] } { - doc_body_append " + append custom_fields_iteration_html " - " + if { $column_type == "char(1)" } { + append custom_fields_iteration_html "[ec_message_if_null [ec_PrettyBoolean [set $field_identifier]]]\n" + } elseif { $column_type == "date" } { + append custom_fields_iteration_html "[ec_message_if_null [util_AnsiDatetoPrettyDate [set $field_identifier]]]\n" + } else { + append custom_fields_iteration_html "[ec_display_as_html [ec_message_if_null [set $field_identifier]]]\n" + } + append custom_fields_iteration_html "" } } -doc_body_append " - - - - - - - - - - - - - - - - -
- Product ID: - - $product_id -
- Product Name: - - $product_name -
- SKU: - - [ec_message_if_null $sku] -
- Categorization: - - [ec_category_subcategory_and_subsubcategory_display $category_list $subcategory_list $subsubcategory_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]] - } else { - doc_body_append [ec_message_if_null $stock_status] + set stock_status_html [util_memoize "ad_parameter -package_id [ec_id] \"StockMessage[string toupper $stock_status]\"" [ec_cache_refresh]] } - - 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] -
- 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: [ec_message_if_null [ec_pretty_price $temp_price $currency]]
$field_name: " - if { $column_type == "char(1)" } { - doc_body_append "[ec_message_if_null [ec_PrettyBoolean [set $field_identifier]]]\n" - } elseif { $column_type == "date" } { - doc_body_append "[ec_message_if_null [util_AnsiDatetoPrettyDate [set $field_identifier]]]\n" - } else { - doc_body_append "[ec_display_as_html [ec_message_if_null [set $field_identifier]]]\n" - } - doc_body_append " -
- Template: - - [ec_message_if_null [db_string template_name_select "select template_name from ec_templates where template_id=:template_id" -default "" ]] -
- Date Added: - - [util_AnsiDatetoPrettyDate $creation_date] -
- Date Available: - - [util_AnsiDatetoPrettyDate $available_date] -
- Directory Name (where image & other product info is kept): - - $dirname_cell -
-(Edit) -
+set sku_html [ec_message_if_null $sku] +set categorization_html [ec_category_subcategory_and_subsubcategory_display $category_list $subcategory_list $subsubcategory_list] +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]] +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 present_p_html [ec_message_if_null [ec_PrettyBoolean $present_p]] +set weight_html "[ec_message_if_null $weight] [ec_decode $weight "" "" [ad_parameter -package_id [ec_id] WeightUnits ecommerce]]" +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 date_added_html [util_AnsiDatetoPrettyDate $creation_date] +set date_available_html [util_AnsiDatetoPrettyDate $available_date] -

Miscellaneous

- - - [ad_admin_footer]" +set audit_url_html "[ec_url_concat [ec_url] /admin]/audit?[export_url_vars audit_name audit_id audit_id_column return_url audit_tables main_tables]"