-
-
-Product Name:
- |
-
-$product_name
- |
-
-
-
-SKU
- |
-
-$sku
- |
-
-
-
-Categorization:
- |
-
-[ec_category_subcategory_and_subsubcategory_display $category_id_list $subcategory_id_list $subsubcategory_id_list]
- |
-
-"
-if { !$multiple_retailers_p } {
- doc_body_append "
-
- Stock Status:
- |
-
- "
+} else {
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 " |
-
- "
-}
-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]
- |
-
-"
-if { !$multiple_retailers_p } {
- doc_body_append "
-
- Regular Price:
- |
-
- [ec_message_if_null [ec_pretty_price $price $currency]]
- |
-
- "
-}
-doc_body_append "
-
-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]]
- |
-
-"
-if { !$multiple_retailers_p } {
- doc_body_append "
-
- Shipping Price
- |
-
- [ec_message_if_null [ec_pretty_price $shipping $currency]]
- |
-
-
-
- Shipping - Additional
- |
-
- [ec_message_if_null [ec_pretty_price $shipping_additional $currency]]
- |
-
- "
-}
-doc_body_append "
-
-Weight
- |
-
-[ec_message_if_null $weight] [ec_decode $weight "" "" [ad_parameter -package_id [ec_id] WeightUnits ecommerce]]
- |
-
-"
-if { !$multiple_retailers_p } {
+ set user_classes_select_html ""
db_foreach user_classes_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 "
-
-
+ if { [info exists user_class_prices($user_class_id)] } {
+ append user_classes_select_html " |
$user_class_name Price:
- |
-
+ |
[ec_message_if_null [ec_pretty_price [set user_class_prices($user_class_id)] $currency]]
- |
-
- "
- }
+ "
+ }
}
}
+set regular_price [ec_message_if_null [ec_pretty_price $price $currency]]
+set shipping_price [ec_message_if_null [ec_pretty_price $shipping $currency]]
+set shipping_additional_price [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 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 template_name_select_html [ec_message_if_null [db_string template_name_select "select template_name from ec_templates where template_id=:template_id" -default ""]]
+set available_date_html [ec_message_if_null [util_AnsiDatetoPrettyDate [ec_date_text available_date]]]
+
+set custom_fields_select_html ""
db_foreach custom_fields_select {
select field_identifier, field_name, column_type
from ec_custom_product_fields
where active_p = 't'
} {
if { [string equal $column_type "date"] || [string equal $column_type "timestamp"] } {
-
- #CM This is a mess but it seems to work. Basically need to put together the date from the pieces
-
- #set up a date array to work with.
- array set date "year $ec_custom_fields($field_identifier.year) month $ec_custom_fields($field_identifier.month) day $ec_custom_fields($field_identifier.day)"
-
- #Validate the date - This really should get caught somewhere or put up in the validate section of page contract.
-
- ec_date_widget_validate date
-
- #Run the proc that usually runs as part of page contract
- ad_page_contract_filter_proc_date name date
-
- #Now set the custom field to the ansi date that is set by the above.
- set ec_custom_fields($field_identifier) $date(date)
-
+ #CM This is a mess but it seems to work. Basically need to put together the date from the pieces
+ #set up a date array to work with.
+ array set date "year $ec_custom_fields($field_identifier.year) month $ec_custom_fields($field_identifier.month) day $ec_custom_fields($field_identifier.day)"
+
+ #Validate the date - This really should get caught somewhere or put up in the validate section of page contract.
+ ec_date_widget_validate date
+ #Run the proc that usually runs as part of page contract
+ ad_page_contract_filter_proc_date name date
+ #Now set the custom field to the ansi date that is set by the above.
+ set ec_custom_fields($field_identifier) $date(date)
}
if { [info exists ec_custom_fields($field_identifier)] } {
- doc_body_append "
-
-
- $field_name
- |
-
- "
+ append custom_fields_select_html " |
$field_name | "
if { $column_type == "char(1)" } {
- doc_body_append "[ec_message_if_null [ec_PrettyBoolean "$ec_custom_fields($field_identifier)"]]\n"
+ append custom_fields_select_html "[ec_message_if_null [ec_PrettyBoolean "$ec_custom_fields($field_identifier)"]]\n"
} elseif { $column_type == "date" || $column_type == "timestamp" } {
- doc_body_append "$ec_custom_fields($field_identifier) to [ec_message_if_null [util_AnsiDatetoPrettyDate "$ec_custom_fields($field_identifier)"]]\n"
+ append custom_fields_select_html "$ec_custom_fields($field_identifier) to [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"
+ append custom_fields_select_html "[ec_display_as_html [ec_message_if_null "$ec_custom_fields($field_identifier)"]]\n"
}
- doc_body_append " |
-
- "
+ append custom_fields_select_html ""
}
}
-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 ""]]
- |
-
-
-
-Available Date
- |
-
-[ec_message_if_null [util_AnsiDatetoPrettyDate [ec_date_text available_date]]]
- |
-
-
-