Index: openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml 4 Jun 2005 10:05:17 -0000 1.1 +++ openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml 5 Jul 2005 23:57:39 -0000 1.2 @@ -1,12 +1,54 @@ + Action Add Course add section add to cart + Balance due: + Bill to: + click here + Courses: + delete + E-mail address: edit + Gift Certificate: info Instructor + Item Description + 1. Please review your order list for accuracy. + 2. Complete this information. + Alternately, you can use a + Completing Your Order: Verify and submit order + Completing Your Order + for %first_names% %last_name% (if you're not %first_names% %last_name% + for the current purchases + if you prefer using some of your other addresses on file with us. + multi-page order process + Purchase + another Course/Section + Purchase another Course/Section + Return to course catalog + Return to main course registration administration + Select another purchaser + Thank You For Your Order + The following has been sent to the purchaser + To complete your order, submit this form, and confirm the information + on the following page. + to send us your order! + Your Shopping Cart is empty. + Order list + Paid By + Participant + Participants + Price/Item + Push + Quantity + Subtotal: + Subtotal + Tax: + TOTAL: + Total: View View All view bio Index: openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.adp 5 Jul 2005 23:57:39 -0000 1.1 @@ -0,0 +1,47 @@ +#dotlrn-ecommerce.E-mail_address#
+ @email@ +

+ #dotlrn-ecommerce.Bill_to# + @billing_address;noquote@
+ + @creditcard_summary;noquote@ + +

+ #dotlrn-ecommerce.Courses# + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#dotlrn-ecommerce.Subtotal#@subtotal@
#dotlrn-ecommerce.Tax#@tax@
------------
#dotlrn-ecommerce.TOTAL#@total@
#dotlrn-ecommerce.Gift_Certificate#-@gift_certifcate@
------------
#dotlrn-ecommerce.Balance_due#-@balance@
#dotlrn-ecommerce.TOTAL#@total@
Index: openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.tcl 5 Jul 2005 23:57:39 -0000 1.1 @@ -0,0 +1,100 @@ +# packages/dotlrn-ecommerce/lib/summary-for-customer.tcl +# +# Order summary +# +# @author (mgh@localhost.localdomain) +# @creation-date 2005-07-06 +# @arch-tag: d3b67a51-7e53-447e-94ca-29a22f8cb3b9 +# @cvs-id $Id: summary-for-customer.tcl,v 1.1 2005/07/05 23:57:39 roelc Exp $ + +foreach required_param {order_id user_id} { + if {![info exists $required_param]} { + return -code error "$required_param is a required parameter." + } +} + +set show_item_detail_p f + +set correct_user_id [db_string correct_user_id " + select user_id as correct_user_id + from ec_orders + where order_id = :order_id"] +if { [string compare $user_id $correct_user_id] != 0 } { + return "Invalid Order ID" +} + +db_1row order_info_select " + select o.confirmed_date, o.creditcard_id, o.shipping_method, + u.email, o.shipping_address as shipping_address_id, c.billing_address as billing_address_id + from ec_orders o + left join cc_users u on (o.user_id = u.user_id) + left join ec_creditcards c on (o.creditcard_id = c.creditcard_id) + where o.order_id = :order_id" + +set shipping_address [ec_pretty_mailing_address_from_ec_addresses $shipping_address_id] + +if { ![empty_string_p $creditcard_id] } { + set creditcard_summary [ad_text_to_html [ec_creditcard_summary $creditcard_id]] +} else { + set creditcard_summary "" +} + +if { [empty_string_p $billing_address_id] } { + db_1row billing_address { + select address_id as billing_address_id + from ec_addresses + where user_id = :user_id + limit 1 + } +} + +set billing_address [ad_text_to_html [ec_pretty_mailing_address_from_ec_addresses $billing_address_id]] + +template::multirow create items quantity product_name options price_name price_charged + +db_foreach order_details_select " + select i.price_name, i.price_charged, i.color_choice, i.size_choice, i.style_choice, + p.product_name, p.one_line_description, p.product_id, count(*) as quantity + from ec_items i, ec_products p + where i.order_id = :order_id + and i.product_id = p.product_id + group by p.product_name, p.one_line_description, p.product_id, i.price_name, i.price_charged, i.color_choice, i.size_choice, i.style_choice" { + + set option_list [list] + if { ![empty_string_p $color_choice] } { + lappend option_list "Color: $color_choice" + } + if { ![empty_string_p $size_choice] } { + lappend option_list "Size: $size_choice" + } + if { ![empty_string_p $style_choice] } { + lappend option_list "Style: $style_choice" + } + set options [join $option_list ", "] + if { ![empty_string_p $options] } { + set options "$options; " + } + + template::multirow append items $quantity $product_name $options $price_name [ec_pretty_price $price_charged [ad_parameter -package_id [ec_id] Currency ecommerce]] + } + +if { ![empty_string_p $confirmed_date] } { + set confirmed_date [util_AnsiDatetoPrettyDate $confirmed_date] +} + +set currency [ad_parameter -package_id [ec_id] Currency ecommerce] + +set price_shipping_gift_certificate_and_tax [ec_price_shipping_gift_certificate_and_tax_in_an_order $order_id] + +set price [lindex $price_shipping_gift_certificate_and_tax 0] +set shipping [lindex $price_shipping_gift_certificate_and_tax 1] +set gift_certificate [lindex $price_shipping_gift_certificate_and_tax 2] +set tax [lindex $price_shipping_gift_certificate_and_tax 3] + +set subtotal [expr $price + $shipping] +set total [expr $price + $shipping + $tax] +set balance [expr $price + $shipping + $tax - $gift_certificate] + +foreach i {price shipping gift_certificate tax subtotal total balance} { + set $i [ec_pretty_price [set $i] $currency] +} Index: openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/lib/summary-for-customer.xql 5 Jul 2005 23:57:39 -0000 1.1 @@ -0,0 +1,38 @@ + + + + + + + + + + + + select user_id as correct_user_id + from ec_orders + where order_id = :order_id + + + + + + select o.confirmed_date, o.creditcard_id, o.shipping_method, + u.email, o.shipping_address as shipping_address_id, c.billing_address as billing_address_id + from ec_orders o + left join cc_users u on (o.user_id = u.user_id) + left join ec_creditcards c on (o.creditcard_id = c.creditcard_id) + where o.order_id = :order_id + + + + + + select i.price_name, i.price_charged, i.color_choice, i.size_choice, i.style_choice, p.product_name, p.one_line_description, p.product_id, count(*) as quantity + from ec_items i, ec_products p + where i.order_id = :order_id + and i.product_id = p.product_id + group by p.product_name, p.one_line_description, p.product_id, i.price_name, i.price_charged, i.color_choice, i.size_choice, i.style_choice + + + Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/check-shopping-cart.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/check-shopping-cart.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/check-shopping-cart.tcl 5 Jul 2005 23:57:38 -0000 1.1 @@ -0,0 +1,52 @@ +# packages/dotlrn-ecommerce/www/ecommerce/check-shopping-cart.tcl + +# WARNING: only meant to be sourced from ecommerce pages in the same directory + +if { ! [info exists user_id] } { + set user_id [ad_verify_and_get_user_id] +} elseif { $user_id == 0 } { + set user_id [ad_verify_and_get_user_id] +} +if {$user_id == 0} { + set form [rp_getform] + ns_set delkey $form user_id + set return_url [ad_return_url] + ad_returnredirect [export_vars -base login {return_url}] + ad_script_abort +} else { + # Make sure all orders are owned by the user + db_transaction { + db_foreach orders { + select order_id as in_basket_order_id + from ec_orders + where order_state = 'in_basket' + and user_session_id = :user_session_id + } { + db_dml set_session_orders { + update ec_orders + set user_id = :user_id + where order_id = :in_basket_order_id + and user_id = 0 + } + + db_foreach items { + select item_id as in_basket_item_id + from ec_items + where order_id = :in_basket_order_id + } { + db_dml set_dotlrn_ecommerce_orders { + update dotlrn_ecommerce_orders + set patron_id = :user_id + where item_id = :in_basket_item_id + and patron_id = 0 + } + db_dml set_dotlrn_ecommerce_orders_2 { + update dotlrn_ecommerce_orders + set participant_id = :user_id + where item_id = :in_basket_item_id + and participant_id = 0 + } + } + } + } +} Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-3.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-3.adp 23 Jun 2005 12:28:22 -0000 1.1 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-3.adp 5 Jul 2005 23:57:38 -0000 1.2 @@ -1,24 +1,24 @@ - Completing Your Order: Verify and submit order - @context_bar;noquote@ + #dotlrn-ecommerce.lt_Completing_Your_Order# + @context;noquote@ @ec_system_owner;noquote@ - - - + + + -
+
-
+ -

Push to send us your order! -

+

#dotlrn-ecommerce.Push# #dotlrn-ecommerce.lt_to_send_us_your_order# +

- @order_summary;noquote@ + -

Push to send us your order! -

- +

#dotlrn-ecommerce.Push# #dotlrn-ecommerce.lt_to_send_us_your_order# +

+ -
+
Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-3.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-3.tcl 1 Jul 2005 03:49:42 -0000 1.4 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-3.tcl 5 Jul 2005 23:57:38 -0000 1.5 @@ -35,54 +35,7 @@ # 5. The order should have credit card and shipping method associated with it. # Require user to be logged in at this point -if { ! [info exists user_id] } { - set user_id [ad_verify_and_get_user_id] -} elseif { $user_id == 0 } { - set user_id [ad_verify_and_get_user_id] -} -if {$user_id == 0} { - set form [rp_getform] - ns_set delkey $form user_id - set return_url [ad_return_url] - ad_returnredirect [export_vars -base login {return_url}] - ad_script_abort -} else { - # Make sure all orders are owned by the user - db_transaction { - db_foreach orders { - select order_id as in_basket_order_id - from ec_orders - where order_state = 'in_basket' - and user_session_id = :user_session_id - } { - db_dml set_session_orders { - update ec_orders - set user_id = :user_id - where order_id = :in_basket_order_id - and user_id = 0 - } - - db_foreach items { - select item_id as in_basket_item_id - from ec_items - where order_id = :in_basket_order_id - } { - db_dml set_dotlrn_ecommerce_orders { - update dotlrn_ecommerce_orders - set patron_id = :user_id - where item_id = :in_basket_item_id - and patron_id = 0 - } - db_dml set_dotlrn_ecommerce_orders_2 { - update dotlrn_ecommerce_orders - set participant_id = :user_id - where item_id = :in_basket_item_id - and participant_id = 0 - } - } - } - } -} +source [acs_root_dir]/packages/dotlrn-ecommerce/www/ecommerce/check-shopping-cart.tcl # Make sure they have an in_basket order, otherwise they've probably # gotten here by pushing Back, so return them to index.tcl @@ -200,7 +153,7 @@ # set display_progress "t" #} -set order_summary [ec_order_summary_for_customer $order_id $user_id] set context_bar [template::adp_parse [acs_root_dir]/packages/[ad_conn package_key]/www/contextbar [list context_addition [list "Completing Your Order"]]] +set context [list "[_ dotlrn-ecommerce.lt_Completing_Your_Order_1]"] set ec_system_owner [ec_system_owner] db_release_unused_handles Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-one-form.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-one-form.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-one-form.adp 4 Jul 2005 12:06:44 -0000 1.3 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-one-form.adp 5 Jul 2005 23:57:38 -0000 1.4 @@ -2,23 +2,22 @@ - Completing Your Order + #dotlrn-ecommerce.lt_Completing_Your_Order_1# -

To complete your order, submit this form, and confirm the information - on the following page.

+

#dotlrn-ecommerce.lt_To_complete_your_orde#

-

Alternately, you can use a multi-page order process, - if you prefer using some of your other addresses on file with us. +

#dotlrn-ecommerce.lt_Alternately_you_can_u# #dotlrn-ecommerce.lt_multi-page_order_proc#, + #dotlrn-ecommerce.lt_if_you_prefer_using_s#

-

1. Please review your order list for accuracy.

-

Order list

+

#dotlrn-ecommerce.lt_1_Please_review_your_#

+

#dotlrn-ecommerce.Order_list#

@items_ul;noquote@
-

2. Complete this information.

+

#dotlrn-ecommerce.lt_2_Complete_this_infor#

- \ No newline at end of file + Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-one-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-one-form.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-one-form.tcl 4 Jul 2005 15:44:13 -0000 1.10 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/checkout-one-form.tcl 5 Jul 2005 23:57:38 -0000 1.11 @@ -55,49 +55,7 @@ } } -if {$user_id == 0} { - set form [rp_getform] - ns_set delkey $form user_id - set return_url [ad_return_url] - ad_returnredirect [export_vars -base login {return_url}] - ad_script_abort -} else { - # Make sure all orders are owned by the user - db_transaction { - db_foreach orders { - select order_id as in_basket_order_id - from ec_orders - where order_state = 'in_basket' - and user_session_id = :user_session_id - } { - db_dml set_session_orders { - update ec_orders - set user_id = :user_id - where order_id = :in_basket_order_id - and user_id = 0 - } - - db_foreach items { - select item_id as in_basket_item_id - from ec_items - where order_id = :in_basket_order_id - } { - db_dml set_dotlrn_ecommerce_orders { - update dotlrn_ecommerce_orders - set patron_id = :user_id - where item_id = :in_basket_item_id - and patron_id = 0 - } - db_dml set_dotlrn_ecommerce_orders_2 { - update dotlrn_ecommerce_orders - set participant_id = :user_id - where item_id = :in_basket_item_id - and participant_id = 0 - } - } - } - } -} +source [acs_root_dir]/packages/dotlrn-ecommerce/www/ecommerce/check-shopping-cart.tcl # Make sure they have an in_basket order, otherwise they've probably # gotten here by pushing Back, so return them to index.tcl Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/finalize-order.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/finalize-order.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/finalize-order.tcl 1 Jul 2005 03:49:42 -0000 1.3 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/finalize-order.tcl 5 Jul 2005 23:57:38 -0000 1.4 @@ -23,48 +23,7 @@ set user_session_id [ec_get_user_session_id] # Require user to be logged in at this point -if { ! [info exists user_id] } { - set user_id [ad_verify_and_get_user_id] -} elseif { $user_id == 0 } { - set user_id [ad_verify_and_get_user_id] -} -if {$user_id == 0} { - set form [rp_getform] - ns_set delkey $form user_id - set return_url [ad_return_url] - ad_returnredirect [export_vars -base login {return_url}] - ad_script_abort -} else { - # Make sure all orders are owned by the user - db_transaction { - db_foreach orders { - select order_id as in_basket_order_id - from ec_orders - where user_id = 0 - and order_state = 'in_basket' - and user_session_id = :user_session_id - } { - db_dml set_session_orders { - update ec_orders - set user_id = :user_id - where order_id = :in_basket_order_id - } - - db_foreach items { - select item_id as in_basket_item_id - from ec_items - where order_id = :in_basket_order_id - } { - db_dml set_dotlrn_ecommerce_orders { - update dotlrn_ecommerce_orders - set patron_id = :user_id, - participant_id = :user_id - where item_id = :in_basket_item_id - } - } - } - } -} +source [acs_root_dir]/packages/dotlrn-ecommerce/www/ecommerce/check-shopping-cart.tcl # If they reload, we don't have to worry about the credit card # authorization code being executed twice because the order has Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.adp 28 Jun 2005 23:13:28 -0000 1.3 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.adp 5 Jul 2005 23:57:38 -0000 1.4 @@ -6,31 +6,31 @@ t shopping-cart - - for @first_names@ @last_name@ (if you're not @first_names@ @last_name@, - click here). - + + #dotlrn-ecommerce.lt_for_first_names_last_#, + #dotlrn-ecommerce.click_here#) + -
- - -
+
+ + + - - - - - - - - - - - - -
Item DescriptionPaid ByParticipantQuantityPrice/ItemSubtotal Action
+ + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + + + - - - - - - - + + + + +
#dotlrn-ecommerce.Item_Description##dotlrn-ecommerce.Paid_By##dotlrn-ecommerce.Participant##dotlrn-ecommerce.Quantity##dotlrn-ecommerce.PriceItem##dotlrn-ecommerce.Subtotal_1# #dotlrn-ecommerce.Action#
@in_cart.product_name@ - @in_cart.patron_name@ @@ -49,98 +49,97 @@ + @in_cart.quantity@ - @in_cart.price;noquote@@in_cart.line_subtotal@ - delete -
Total:@product_counter@ @pretty_total_price@
- - - - - @shipping_options@@total_reg_shipping_price@standard@in_cart.price;noquote@@in_cart.line_subtotal@ + #dotlrn-ecommerce.delete# +
#dotlrn-ecommerce.Total#@product_counter@ @pretty_total_price@
+ + + + + @shipping_options@@total_reg_shipping_price@standard
- - - - -  @total_exp_shipping_price@express
+ + + + +  @total_exp_shipping_price@express
- - - - -   - @shipping_method_pickup@pickup
+ + + + +   + @shipping_method_pickup@pickup
- Residents of @tax_entries.state@, please add @tax_entries.pretty_tax@ tax. -
+ Residents of @tax_entries.state@, please add @tax_entries.pretty_tax@ tax. +
- - @shipping_options;noquote@ - + + @shipping_options;noquote@ + -
-
+
+ -
- -
- - -
Your Shopping Cart is empty.
-
+
+ +
+ + +
#dotlrn-ecommerce.lt_Your_Shopping_Cart_is#
+
- + Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/thank-you.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/thank-you.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/thank-you.adp 23 Jun 2005 12:28:21 -0000 1.1 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/thank-you.adp 5 Jul 2005 23:57:38 -0000 1.2 @@ -1,28 +1,25 @@ - Thank You For Your Order + #dotlrn-ecommerce.lt_Thank_You_For_Your_Or# @context;noquote@ @ec_system_owner;noquote@
-

The following has beens sent to the purchaser

- @order_summary;noquote@ +

#dotlrn-ecommerce.lt_The_following_has_bee#

+
-