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

@title@

+

+All fields are optional except Product Name. +

+
+@export_form_vars_html;noquote@ + + + + + + + + + + + + + + + + + @stock_status_html;noquote@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Product Name
SKUIt's not necessary to include a SKU because the system generates its own +internal product_id to uniquely distinguish products.
Product Category@product_category_html;noquote@Choose as many categories as you like. The product will +be displayed on the web site in each of the categories you select.
Stock Status@stock_status_html;noquote@
Regular PriceAll prices are in @currency@. The price should + be written as a decimal number (no special characters like $). +
Shipping PriceThe "Shipping Price", "Shipping Price - Additional", and "Weight" fields + may or may not be applicable, depending on the + shipping rules you have set up for + your ecommerce system.
Shipping Price - Additional per item if ordering more than 1 (leave blank if same as Shipping Price above)
One-Line Description
Additional Descriptive Text

Search Keywords

+Data from Product's Name, One Line Description, and Other Detailed Description + are automatically included in product searches. No need to repeat as keywords.

Picture + +
Your current picture is:
@thumbnail;noquote@ +
This picture (.gif or .jpg format) can be as large as you like. A thumbnail will be automatically generated. Note that file uploading doesn't work with Internet Explorer 3.0.
Color ChoicesThis should be a comma-separated list of colors the user is allowed to choose from +when ordering. If there are no choices, leave this blank.
Size ChoicesThis should be a comma-separated list of sizes the user is allowed to choose from +when ordering. If there are no choices, leave this blank.
Style ChoicesThis should be a comma-separated list of styles the user is allowed to choose from +when ordering. If there are no choices, leave this blank.
Email on PurchaseThis should be a comma-separated list of recipients to notify when a purchase is made. If you do not wish email to be sent, leave this blank.
URL where the consumer can get more info on the product
Is this product shippable?Yes +   +No +You might choose "No" if this product is actually a service.
Should this product be displayed when the user does a search?Yes +   +No +You might choose "No" if this product is part of a series.
When does this product become available for purchase?@available_date_html;noquote@
Weight (@weight_units_html@)
Template@template_widget_html;noquote@Select a template to use when displaying this product. If none is +selected, the product will be displayed with the system default template.
+ +

+ +

Special Prices for User Classes

+
+ +@n_user_classes_html;noquote@ +
+ + + +

Custom Fields

+

+ +@custom_product_fields_html;noquote@ +
+ +

+ +
+ Index: openacs-4/packages/ecommerce/www/admin/products/edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/edit.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/ecommerce/www/admin/products/edit.tcl 24 Feb 2005 13:33:15 -0000 1.8 +++ openacs-4/packages/ecommerce/www/admin/products/edit.tcl 13 Aug 2008 18:07:00 -0000 1.9 @@ -19,19 +19,11 @@ set product_name [ec_product_name $product_id] -doc_body_append "[ad_admin_header "Edit $product_name"] +set title "Edit $product_name" +set context [list $title] -

Edit $product_name

+set multiple_retailers_p [parameter::get -package_id [ec_id] -parameter MultipleRetailersPerProductP] -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index" "Products"] [list "one?[export_url_vars product_id]" "One"] "Edit"] - -
- -All fields are optional except Product Name. -

-" -set multiple_retailers_p [ad_parameter -package_id [ec_id] MultipleRetailersPerProductP ecommerce] - db_1row product_select " select product_id, sku, product_name, to_char(creation_date, 'YYYY-MM-DD') as creation_date, one_line_description, @@ -42,26 +34,10 @@ template_id, stock_status, color_list, size_list, style_list, email_on_purchase_list, to_char(last_modified, 'YYYY-MM-DD') as last_modified, last_modifying_user, modified_ip_address -from ec_products where product_id=:product_id -" +from ec_products where product_id=:product_id" -doc_body_append "

-[export_form_vars product_id] - - - - - - - - - - -" - # have to deal with category widget - +set export_form_vars_html [export_form_vars product_id] set category_list [db_list category_list_select "select category_id from ec_category_product_map where product_id=:product_id"] set subcategory_list [db_list subcategory_list_select "select subcategory_id from ec_subcategory_product_map where product_id=:product_id"] @@ -70,220 +46,71 @@ set categorization_default [ec_determine_categorization_widget_defaults $category_list $subcategory_list $subsubcategory_list] -doc_body_append " - - - - -" -if { !$multiple_retailers_p } { - doc_body_append " - - - - " +set product_category_html [ec_category_widget t $categorization_default] +if { $multiple_retailers_p } { + set stock_status_html "[export_form_vars stock_status]\n" + } else { - doc_body_append "[export_form_vars stock_status]\n" + set stock_status_html [ec_stock_status_widget $stock_status] + set price_html "[export_form_vars price]\n" + set shipping_html "[export_form_vars shipping shipping_additional]\n" } -doc_body_append " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" if { [empty_string_p $url] } { set url "http://" } -doc_body_append " - -" -if { !$multiple_retailers_p } { - doc_body_append " - - - - " -} else { - doc_body_append "[export_form_vars price]\n" -} -doc_body_append " - - - - - - - - - - - - - -" -if { !$multiple_retailers_p } { - doc_body_append " - - - - - - - - - " + set present_p_html "checked" } else { - doc_body_append "[export_form_vars shipping shipping_additional]\n" + set no_present_p_html "checked" } -doc_body_append " - - - - - - - - -
Product Name
SKUIt's not necessary to include a SKU because the system generates its own -internal product_id to uniquely distinguish products.
Product Category[ec_category_widget t $categorization_default]Choose as many categories as you like. The product will -be displayed on the web site in each of the categories you select.
Stock Status[ec_stock_status_widget $stock_status]
One-Line Description
Additional Descriptive Text

Search Keywords

-Data from Product's Name, One Line Description, and Other Detailed Description - are automatically included in product searches. No need to repeat as keywords.

Picture" set thumbnail [ec_linked_thumbnail_if_it_exists $dirname f] -if { ![empty_string_p $thumbnail] } { - doc_body_append "
Your current picture is:
$thumbnail" -} -doc_body_append "
This picture (.gif or .jpg format) can be as large as you like. A thumbnail will be automatically generated. Note that file uploading doesn't work with Internet Explorer 3.0.
Color ChoicesThis should be a comma-separated list of colors the user is allowed to choose from -when ordering. If there are no choices, leave this blank.
Size ChoicesThis should be a comma-separated list of sizes the user is allowed to choose from -when ordering. If there are no choices, leave this blank.
Style ChoicesThis should be a comma-separated list of styles the user is allowed to choose from -when ordering. If there are no choices, leave this blank.
Email on PurchaseThis should be a comma-separated list of recipients to notify when a purchase is made. If you do not wish email to be sent, leave this blank.
URL where the consumer can get more info on the product
Regular PriceAll prices are in [ad_parameter -package_id [ec_id] Currency ecommerce]. The price should - be written as a decimal number (no special characters like \$). -
Is this product shippable?Yes -   -No -You might choose \"No\" if this product is actually a service.
Should this product be displayed when the user does a search?Yes -   -No -You might choose \"No\" if this product is part of a series.
When does this product become available for purchase?[ad_dateentrywidget available_date $available_date]
Shipping PriceThe \"Shipping Price\", \"Shipping Price - Additional\", and \"Weight\" fields - may or may not be applicable, depending on the - shipping rules you have set up for - your ecommerce system.
Shipping Price - Additional per item if ordering more than 1 (leave blank if same as Shipping Price above)
Weight ([ad_parameter -package_id [ec_id] WeightUnits ecommerce])
Template[ec_template_widget $category_list $template_id]Select a template to use when displaying this product. If none is -selected, the product will be displayed with the system default template.
+set available_date_html [ad_dateentrywidget available_date $available_date] +set weight_units_html [parameter::get -package_id [ec_id] -parameter WeightUnits -default lbs] +set template_widget_html [ec_template_widget $category_list $template_id] -

-" - set n_user_classes [db_string num_user_classes_select "select count(*) from ec_user_classes"] +set n_user_classes_html "" if { $n_user_classes > 0 && !$multiple_retailers_p} { - doc_body_append "

Special Prices for User Classes

- -

- - - " - set first_class_p 1 db_foreach user_classes_select "select user_class_id, user_class_name from ec_user_classes order by user_class_name" { - doc_body_append " - - " + append n_user_classes_html " + " - if { $first_class_p } { - set first_class_p 0 - doc_body_append "\n" - } - doc_body_append "\n" + } + append n_user_classes_html "\n" } - doc_body_append "
$user_class_name
$user_class_nameEnter prices (no + if { $first_class_p } { + set first_class_p 0 + doc_body_append "Enter prices (no special characters like \$) only if you want people in user classes to be charged a different price than the regular price. If you leave user class prices blank, then the users will be charged regular price.
\n" } -if { [db_string num_custom_product_fields_select "select count(*) from ec_custom_product_fields where active_p='t'"] > 0 } { - - doc_body_append "

Custom Fields

- -

- - - " - +set custom_product_fields_html "" +set n_custom_product_fields [db_string num_custom_product_fields_select "select count(*) from ec_custom_product_fields where active_p='t'"] +if { $n_custom_product_fields > 0 } { db_foreach custom_fields_select "select field_identifier, field_name, default_value, column_type from ec_custom_product_fields where active_p='t' order by creation_date" { set current_field_value [db_string custom_field_value_select "select $field_identifier from ec_custom_product_field_values where product_id=:product_id" -default "$default_value" ] # check for cases where field is blank and nontext, because custom_field_value_select -default does not catch them if { [empty_string_p $current_field_value] && [regexp $column_type "timestampdatenumericintegerboolean"]} { set current_field_value $default_value } - doc_body_append "\n" + append custom_product_fields_html "\n" } - - doc_body_append "
$field_name[ec_custom_product_field_form_element $field_identifier $column_type $current_field_value]
$field_name[ec_custom_product_field_form_element $field_identifier $column_type $current_field_value]
\n" } - -doc_body_append "

- -
-
-[ad_admin_footer] -"