Index: openacs-4/packages/ecommerce/www/admin/products/offer-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/offer-add.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/products/offer-add.adp 15 Aug 2008 11:33:47 -0000 1.1 @@ -0,0 +1,41 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Retailer:@retailer_name_select_html;noquote@
Price:@price_html;noquote@
Shipping:@shipping_price_html;noquote@
Stock Status:@stock_status_html;noquote@
Offer Begins@offer_begins_html;noquote@
Offer Expires@offer_expires_html;noquote@
Special Offer:@special_offer_html;noquote@
+
+@export_offer_add_2_html;noquote@ +
+ +
+
Index: openacs-4/packages/ecommerce/www/admin/products/offer-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/offer-add.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/www/admin/products/offer-add.tcl 21 Apr 2008 14:18:29 -0000 1.6 +++ openacs-4/packages/ecommerce/www/admin/products/offer-add.tcl 15 Aug 2008 11:33:47 -0000 1.7 @@ -108,72 +108,29 @@ # error checking done -doc_body_append "[ad_admin_header "Confirm Retailer Offer on $product_name"] +set title "Confirm Retailer Offer on $product_name" +set context [list [list index Products] $title] -

Confirm Retailer Offer on $product_name

+set currency [parameter::get -package_id [ec_id] -parameter Currency -default "USD"] +set retailer_name_select_html [db_string retailer_name_select "select retailer_name || ' (' || decode(reach,'web',url,city || ', ' || usps_abbrev) || ')' from ec_retailers where retailer_id=:retailer_id"] +set price_html [ec_pretty_price $price $currency] -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Products"] [list "one.tcl?[export_url_vars product_id]" $product_name] "Confirm Retailer Offer"] - -
-" - -set currency [ad_parameter -package_id [ec_id] Currency ecommerce] - -doc_body_append " - - - - - - - - - - -" -if { [info exists shipping_unavailable_p] } { - doc_body_append "\n" +if { [info exists shipping_unavailable_p && shipping_unavailable_p eq "t"] } { + set shipping_price_html "Pick Up" } else { - doc_body_append "\n" + set shipping_unavailable_p "f" + set shipping_price_html [ec_pretty_price $shipping $currency] } -doc_body_append " - - - - - - - - - - - - -" +set offer_begins_html "[util_AnsiDatetoPrettyDate [ec_date_with_time_stripped $offer_begins]]" +set offer_expires_html "[util_AnsiDatetoPrettyDate [ec_date_with_time_stripped $offer_ends]]" -if { $special_offer_p == "t" } { - doc_body_append "\n" -} - -doc_body_append "
Retailer:[db_string retailer_name_select "select retailer_name || ' (' || decode(reach,'web',url,city || ', ' || usps_abbrev) || ')' from ec_retailers where retailer_id=:retailer_id"]
Price:[ec_pretty_price $price $currency]
Shipping:Pick Up[ec_pretty_price $shipping $currency]
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 "parameter::get -package_id [ec_id] -parameter \"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 "
Offer Begins[util_AnsiDatetoPrettyDate [ec_date_with_time_stripped $offer_begins]]
Offer Expires[util_AnsiDatetoPrettyDate [ec_date_with_time_stripped $offer_ends]]
Special Offer:$special_offer_html
-" - set offer_id [db_nextval ec_offer_sequence] -doc_body_append "
-[export_form_vars offer_id product_id retailer_id price shipping stock_status shipping_unavailable_p offer_begins offer_ends special_offer_p special_offer_html] -
- -
-
+set export_offer_add_2_html [export_form_vars offer_id product_id retailer_id price shipping stock_status shipping_unavailable_p offer_begins offer_ends special_offer_p special_offer_html] -[ad_admin_footer] -"