Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl 7 Aug 2005 13:35:35 -0000 1.10 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl 9 Aug 2005 10:55:04 -0000 1.11 @@ -48,17 +48,17 @@ set participant_id $user_id } +db_0or1row section_info { + select section_id, community_id + from dotlrn_ecommerce_section + where product_id = :product_id +} + if { [acs_object_type $participant_id] != "group" } { ns_log notice "DEBUG:: checking if this should go to the waiting list" set admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] - db_0or1row section_info { - select section_id, community_id - from dotlrn_ecommerce_section - where product_id = :product_id - } - if { [exists_and_not_null community_id] } { ns_log notice "DEBUG:: checking available slots" set member_state [db_string awaiting_approval { @@ -372,5 +372,10 @@ } } +# The order goes to the shopping cart, flush the cache +if { [info exists section_id] } { + dotlrn_ecommerce::section::flush_cache -user_id $user_id $section_id +} + db_release_unused_handles ad_returnredirect [export_vars -base shopping-cart { user_id product_id }]