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

@title@

+ +

Please confirm that you want to end the sale price right now.

+ +
+@export_form_vars_html;noquote@ + +
+ +
+ +
Index: openacs-4/packages/ecommerce/www/admin/products/sale-price-expire.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/sale-price-expire.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/products/sale-price-expire.tcl 9 Mar 2004 00:59:51 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/products/sale-price-expire.tcl 16 Aug 2008 11:16:05 -0000 1.4 @@ -15,27 +15,7 @@ set product_name [ec_product_name $product_id] -doc_body_append "[ad_admin_header "Expire Sale Price for $product_name"] +set title "Expire Sale Price for $product_name" +set context [list [list index Products] $title] -

Expire Sale Price for $product_name

- -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Products"] [list "one.tcl?[export_url_vars product_id]" $product_name] "Expire Sale Price"] - -
- -Please confirm that you want to end the sale price right now. - -
- -[export_form_vars product_id sale_price_id] - -

- -

- -
- -
- -[ad_admin_footer] -" \ No newline at end of file +set export_form_vars_html [export_form_vars product_id sale_price_id] Index: openacs-4/packages/ecommerce/www/admin/products/sale-prices.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/sale-prices.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/products/sale-prices.adp 16 Aug 2008 11:16:05 -0000 1.1 @@ -0,0 +1,79 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ + +

Regular Price

+
+ Regular: @price@ +
+
+ +

Current Sale Prices

+ +

There are no current sale prices.

+
+
    + @current_sales_select_html;noquote@ +
+
+ + +

Add a Sale Price

+ +
+
+@export_form_vars_html;noquote@ + + + + + + + + + + + + + + + + + + + + + + +
Sale Price (in @currency@)
Name (like Special Offer or Introductory Price or Sale Price)
Sale Begins@sale_begins_widget_html;noquote@
Sale Ends@sale_ends_widget_html;noquote@
Offer Code None needed
+ Require this code: +
+ Please generate a code +
+ +
+ +
+ +
+ +
+

To let customers take advantage of a sale price that requires an offer_code, send them to the URL +of the product display page with &offer_code=offer_code +appended to the URL.

+ +
+ +
+ +

Old or Yet-to-Come Sale Prices

+ + +

There are no non-current sale prices.

+
+
    + @non_current_sales_select_html;noquote@ +
+
Index: openacs-4/packages/ecommerce/www/admin/products/sale-prices.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/sale-prices.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/ecommerce/www/admin/products/sale-prices.tcl 9 Mar 2004 00:59:51 -0000 1.5 +++ openacs-4/packages/ecommerce/www/admin/products/sale-prices.tcl 16 Aug 2008 11:16:05 -0000 1.6 @@ -13,7 +13,10 @@ ad_require_permission [ad_conn package_id] admin set product_name [ec_product_name $product_id] +set title "Sale Prices for $product_name" +set context [list [list index Products] $title] + proc ec_write_out_one_sale {} { uplevel { doc_body_append "
  • $sale_name
    @@ -45,124 +48,41 @@ } } -set currency [ad_parameter -package_id [ec_id] Currency ecommerce] +set currency [parameter::get -package_id [ec_id] -parameter Currency -default "USD"] -doc_body_append "[ad_admin_header "Sale Prices for $product_name"] - -

    Sale Price for $product_name

    - -[ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index.tcl" "Products"] [list "one.tcl?[export_url_vars product_id]" "One"] "Sale Prices"] - -
    -" if {[info exists price]} { - doc_body_append " -

    Regular Price

    -
    - Regular: [ec_pretty_price $price $currency] -
    " + set price_html [ec_pretty_price $price $currency] } -doc_body_append " -

    Current Sale Prices

    -
      -" set sale_price_counter 0 +set current_sales_select_html "" db_foreach current_sales_select "select sale_price_id, sale_name, sale_price, offer_code, to_char(sale_begins,'YYYY-MM-DD HH24:MI:SS') as sale_begins, to_char(sale_ends,'YYYY-MM-DD HH24:MI:SS') as sale_ends, decode(sign(sysdate-sale_begins),1,1,0) as sale_begun_p, decode(sign(sysdate-sale_ends),1,1,0) as sale_expired_p from ec_sale_prices_current where product_id=:product_id order by last_modified desc" { incr sale_price_counter - ec_write_out_one_sale + append current_sales_select_html [ec_write_out_one_sale] } -if { $sale_price_counter == 0 } { - doc_body_append "There are no current sale prices.\n" -} +set export_form_vars_html [export_form_vars product_id product_name price] -doc_body_append "
    - -

    - -

    Add a Sale Price

    - -
    - -
    -[export_form_vars product_id product_name price] - - - - - - - - - - - - - - - - - - - - - - -
    Sale Price (in $currency)
    Name (like Special Offer or Introductory Price or Sale Price)
    Sale Begins[ad_dateentrywidget sale_begins] [ec_time_widget sale_begins "00:00:00"]
    Sale Ends[ad_dateentrywidget sale_ends] [ec_time_widget sale_ends "23:59:59"]
    Offer Code None needed
    - Require this code: -
    - Please generate a code -
    - -

    - -

    - -
    - -
    - -
    - -

    - -

    Old or Yet-to-Come Sale Prices

    - -
      -" -set currency [ad_parameter -package_id [ec_id] Currency ecommerce] - - -set sale_price_counter 0 - +set nc_sale_price_counter 0 +set non_current_sales_select_html "" db_foreach non_current_sales_select "select sale_price_id, sale_name, sale_price, offer_code, to_char(sale_begins,'YYYY-MM-DD HH24:MI:SS') as sale_begins, to_char(sale_ends,'YYYY-MM-DD HH24:MI:SS') as sale_ends, decode(sign(sysdate-sale_begins),1,1,0) as sale_begun_p, decode(sign(sysdate-sale_ends),1,1,0) as sale_expired_p from ec_sale_prices where product_id=:product_id and (sale_begins - sysdate > 0 or sale_ends - sysdate < 0) order by last_modified desc" { - incr sale_price_counter - ec_write_out_one_sale + incr nc_sale_price_counter + append non_current_sales_select_html [ec_write_out_one_sale] } -if { $sale_price_counter == 0 } { - doc_body_append "There are no non-current sale prices.\n" -} +set sale_begins_widget_html "[ad_dateentrywidget sale_begins] [ec_time_widget sale_begins "00:00:00"]" +set sale_ends_widget_html "[ad_dateentrywidget sale_ends] [ec_time_widget sale_ends "23:59:59"]" -doc_body_append "
    -To let customers take advantage a sale price that requires an offer_code, send them to the URL -of the product display page with &offer_code=offer_code -appended to the URL. -[ad_admin_footer] -" - -