Index: openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl 1 Sep 2005 12:23:21 -0000 1.21 +++ openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl 1 Sep 2005 13:13:05 -0000 1.22 @@ -19,6 +19,7 @@ } { # DEDS: for notifying when wait list notify reached set community_notify_waitlist_list [list] + set checkout_user_id [ad_conn user_id] if { [exists_and_not_null patron_id] } { if { ! [dotlrn::user_p -user_id $patron_id] } { @@ -174,14 +175,6 @@ dotlrn_ecommerce::section::flush_cache $section_id } } - - # Set checkout for order - db_dml checkout_user { - update dotlrn_ecommerce_orders - set checked_out_by = :patron_id - where item_id = :item_id - } - } # DEDS @@ -225,6 +218,15 @@ } } + # Set checkout for order + db_dml checkout_user { + update dotlrn_ecommerce_orders + set checked_out_by = :checkout_user_id + where item_id in (select item_id + from ec_items + where order_id = :order_id) + } + ns_log notice "dotlrn-ecommerce callback: Run successfully" }