Index: openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info 22 Jun 2005 05:40:32 -0000 1.4 +++ openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info 23 Jun 2005 08:21:45 -0000 1.5 @@ -30,7 +30,7 @@ - + Index: openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql 22 Jun 2005 05:40:32 -0000 1.6 +++ openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql 23 Jun 2005 08:21:45 -0000 1.7 @@ -59,5 +59,10 @@ participant_id integer references parties(party_id) on delete cascade not null ); +-- Create custom ecommerce field +insert into ec_custom_product_fields (field_identifier, field_name, default_value, column_type, last_modified,last_modifying_user, modified_ip_address) values ('maxparticipants', 'Max Participants', '', 'integer', now(), '0', '0.0.0.0'); +alter table ec_custom_product_field_values add maxparticipants integer; +alter table ec_custom_p_field_values_audit add maxparticipants integer; + \i dotlrn-ecommerce-memberships-create.sql \i dotlrn-ecommerce-admin-portlet-create.sql \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/www/admin/setup.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/Attic/setup.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-ecommerce/www/admin/setup.tcl 22 Jun 2005 05:40:33 -0000 1.1 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/setup.tcl 23 Jun 2005 08:21:45 -0000 1.2 @@ -7,7 +7,12 @@ # set the default template parameter::set_value -parameter "DefaultMaster" -value "/www/mos-master" -package_id [subsite::main_site_id] -# create instructor and assitant community +# enable member pricing +parameter::set_value -package_id $package_id -parameter "MemberPriceP" -value "1" + +# *** COMMUNITIES **** + +# create instructor and assistant community # and set the parameters set community_id [dotlrn_community::new \ @@ -24,14 +29,37 @@ -pretty_name "Assistants Community"] parameter::set_value -package_id $package_id -parameter "AssistantCommunityId" -value $community_id -# create category and set parameter +# *** CATEGORIES **** + +# create categories, set parameters and populate + set tree_id [category_tree::add -name "Grade"] category_tree::map -tree_id $tree_id -object_id $package_id parameter::set_value -package_id $package_id -parameter "GradeCategoryTree" -value $tree_id -# populate categories with data +set grades_list { "K" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "Pre-K" "Adult"} +foreach grade $grades_list { + category::add -tree_id $tree_id -parent_id "" -name $grade +} -# populate courses +set tree_id [category_tree::add -name "Patron Relationships"] +category_tree::map -tree_id $tree_id -object_id $package_id +parameter::set_value -package_id $package_id -parameter "PatronRelationshipCategoryTree" -value $tree_id +set relationship_list { "Father" "Mother" "Son" "Daughter" "Brother" "Sister" "Aunt" "Uncle" "Grandmother" "Grandfather" "Other" } + +foreach relation $relationship_list { + category::add -tree_id $tree_id -parent_id "" -name $relation +} + +set tree_id [db_string "get_catalog_id" "select object_id from acs_objects where title = 'dotlrn-course-catalog'"] + +set course_type_list { "Family Course Today" "Technology" "Life Science" "Chemistry" "Exhibit Related" "Elder Hospital Program"} + +foreach relation $course_type_list { + category::add -tree_id $tree_id -parent_id "" -name $relation +} + + ad_returnredirect "/" \ No newline at end of file