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.25 -r1.26 --- openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info 15 Aug 2005 08:47:37 -0000 1.25 +++ openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info 20 Aug 2005 18:27:55 -0000 1.26 @@ -7,18 +7,19 @@ f t - + Roel Canicula Package to tie the dotLRN, Ecommerce, Assessments and dotLRN Catalog packages together 2005-08-15 Solution Grove Package to tie the dotLRN, Ecommerce, Assessments and dotLRN Catalog packages together. Initially intended for the MOS and MGH projects, the goal is to create a reusable module for similar projects. 0 - + + 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.39 -r1.40 --- openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml 18 Aug 2005 17:23:04 -0000 1.39 +++ openacs-4/packages/dotlrn-ecommerce/catalog/dotlrn-ecommerce.en_US.ISO-8859-1.xml 20 Aug 2005 18:27:54 -0000 1.40 @@ -1,5 +1,5 @@ - + Action Add Course @@ -46,6 +46,7 @@ Currently Selected Date delete + Discount Display All Orders Display Course E-mail address: @@ -58,6 +59,7 @@ Submit application Email Templates Email templates + Enter Offer Code Expense Tracking Expenses Expires @@ -164,10 +166,12 @@ Select a payment method Select another purchaser Sessions and Attendance + Sorry, the offer code was not accepted. Thank you for your application to %section_name%. Thank You For Your Order The course only has $available_slots slot(s) left The following has been sent to the purchaser + The offer code was accepted. You save $savings! This section is currently full, but we are taking registrations for the waiting list. To complete your order, submit this form, and confirm the information on the following page. to send us your order! @@ -216,6 +220,7 @@ No orders No related users Notes + Offer Code: Order Details Order History Order ID Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-oracle.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-oracle.xql 16 Aug 2005 02:01:10 -0000 1.6 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-oracle.xql 20 Aug 2005 18:27:54 -0000 1.7 @@ -21,7 +21,10 @@ select dc.course_id, dc.course_key, dc.course_name, dc.assessment_id, dec.section_id, dec.section_name, dec.product_id, dec.community_id, dc.course_info, - ci.item_id, v.maxparticipants, dec.show_participants_p, dec.show_sessions_p, dec.description + ci.item_id, v.maxparticipants, dec.show_participants_p, dec.show_sessions_p, dec.description, v.show_description_p + + $discount_clause + from dotlrn_catalog dc, cr_items ci, @@ -64,5 +67,12 @@ + + + , (select count(*) + from ec_sale_prices_current + where product_id = dec.product_id) as has_discount_p + + Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-postgresql.xql 16 Aug 2005 02:01:10 -0000 1.6 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-postgresql.xql 20 Aug 2005 18:27:54 -0000 1.7 @@ -20,7 +20,10 @@ select dc.course_id, dc.course_key, dc.course_name, dc.assessment_id, dec.section_id, dec.section_name, dec.product_id, dec.community_id, dc.course_info, - ci.item_id, v.maxparticipants, dec.show_participants_p, dec.show_sessions_p, dec.description + ci.item_id, v.maxparticipants, dec.show_participants_p, dec.show_sessions_p, dec.description, v.show_description_p + + $discount_clause + from dotlrn_catalog dc, cr_items ci left join dotlrn_ecommerce_section dec @@ -62,4 +65,12 @@ + + + , (select count(*) + from ec_sale_prices_current + where product_id = dec.product_id) as has_discount_p + + + Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl,v diff -u -r1.48 -r1.49 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 20 Aug 2005 16:01:51 -0000 1.48 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 20 Aug 2005 18:27:54 -0000 1.49 @@ -257,12 +257,13 @@ lappend actions "[_ dotlrn-ecommerce.My_Shopping_Cart]" [export_vars -base ecommerce/shopping-cart] "[_ dotlrn-ecommerce.My_Shopping_Cart]" set allow_other_registration_p [parameter::get -parameter AllowRegistrationForOtherUsers -default 1] +set offer_code_p [parameter::get -parameter OfferCodesP -default 0] template::list::create \ -name course_list \ -multirow course_list \ -key course_id \ - -pass_properties { admin_p allow_other_registration_p } \ + -pass_properties { admin_p allow_other_registration_p offer_code_p } \ -actions $actions \ -filters $filters \ -bulk_action_method post \ @@ -300,7 +301,7 @@ display_template { Section @course_list.section_name@ - +
@course_list.description;noquote@
@@ -345,14 +346,52 @@
+ + + + +
+ + + [_ dotlrn-ecommerce.Offer_Code]
+ +
+ +
+ @course_list.button@ +
+ @course_list.button@ + +
+ + + + + + +
+ + + [_ dotlrn-ecommerce.Offer_Code]
+ +
+ +
+ @course_list.button@ +
+ + @course_list.button@ +
+
+
[_ dotlrn-ecommerce.register] @@ -379,12 +418,23 @@
[_ dotlrn-ecommerce.lt_Your_application_was_]

+ +

+

+ + + [_ dotlrn-ecommerce.Offer_Code]
+ +
+ + [_ dotlrn-ecommerce.lt_Continue_Registration] +
} - html { width 40% nowrap } + html { width 40% valign middle nowrap } } } -orderby { course_name { @@ -408,8 +458,14 @@ set grade_tree_id [parameter::get -package_id [ad_conn package_id] -parameter GradeCategoryTree -default 0] -db_multirow -extend { fs_chunk section_folder_id section_pages_url category_name community_url course_edit_url section_add_url section_edit_url course_grades section_grades section_zones sections_url member_p sessions instructor_names prices shopping_cart_add_url attendees available_slots pending_p waiting_p approved_p instructor_p registration_approved_url button waiting_list_number asm_url } course_list get_courses { } { +if { $offer_code_p } { + set discount_clause [db_map discount] +} else { + set discount_clause "" +} +db_multirow -extend { fs_chunk section_folder_id section_pages_url category_name community_url course_edit_url section_add_url section_edit_url course_grades section_grades section_zones sections_url member_p sessions instructor_names prices shopping_cart_add_url attendees available_slots pending_p waiting_p approved_p instructor_p registration_approved_url button waiting_list_number asm_url assessment_id } course_list get_courses { } { + # Since dotlrn-ecommerce is based on dotlrn-catalog, # it's possible to have a dotlrn_catalog object without an # associated section, eventually change SQL to look at @@ -442,11 +498,11 @@ set shopping_cart_add_url [export_vars -base register/ { community_id product_id }] } else { if { $allow_other_registration_p } { - set shopping_cart_add_url [export_vars -base ecommerce/participant-change { user_id product_id return_url }] + set shopping_cart_add_url [export_vars -base [ad_conn package_url]ecommerce/participant-change { user_id product_id return_url }] } else { set return_url [export_vars -base [ad_conn package_url]ecommerce/shopping-cart-add { user_id product_id }] if { $user_id == 0 } { - set shopping_cart_add_url [export_vars -base ecommerce/login { return_url }] + set shopping_cart_add_url [export_vars -base login { return_url }] } else { set shopping_cart_add_url $return_url } @@ -531,6 +587,8 @@ if { $available_slots <= 0 } { set button "[_ dotlrn-ecommerce.join_waiting_list]" } + } else { + set available_slots 99999 } set section_zones [util_memoize [list dotlrn_ecommerce::section::section_zones $community_id]] Index: openacs-4/packages/dotlrn-ecommerce/sql/oracle/dotlrn-ecommerce-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/sql/oracle/dotlrn-ecommerce-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-ecommerce/sql/oracle/dotlrn-ecommerce-create.sql 10 Aug 2005 21:18:23 -0000 1.4 +++ openacs-4/packages/dotlrn-ecommerce/sql/oracle/dotlrn-ecommerce-create.sql 20 Aug 2005 18:27:54 -0000 1.5 @@ -70,5 +70,9 @@ alter table ec_custom_product_field_values add maxparticipants integer; alter table ec_custom_p_field_values_audit add maxparticipants integer; +insert into ec_custom_product_fields (field_identifier, field_name, default_value, column_type, last_modified,last_modifying_user, modified_ip_address) values ('show_description_p', 'Show Section Description', '', 'char(1)', now(), '0', '0.0.0.0'); +alter table ec_custom_product_field_values add show_description_p char(1) constraint show_description_p_constraint check (show_description_p in ('t', 'f')); +alter table ec_custom_p_field_values_audit add show_description_p char(1); + @@ dotlrn-ecommerce-memberships-create.sql @@ dotlrn-ecommerce-admin-portlet-create.sql \ No newline at end of file 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.20 -r1.21 --- openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql 10 Aug 2005 21:18:23 -0000 1.20 +++ openacs-4/packages/dotlrn-ecommerce/sql/postgresql/dotlrn-ecommerce-create.sql 20 Aug 2005 18:27:54 -0000 1.21 @@ -85,6 +85,10 @@ alter table ec_custom_product_field_values add maxparticipants integer; alter table ec_custom_p_field_values_audit add maxparticipants integer; +insert into ec_custom_product_fields (field_identifier, field_name, default_value, column_type, last_modified,last_modifying_user, modified_ip_address) values ('show_description_p', 'Show Section Description', '', 'boolean', now(), '0', '0.0.0.0'); +alter table ec_custom_product_field_values add show_description_p boolean; +alter table ec_custom_p_field_values_audit add show_description_p boolean; + -- Add member states alter table membership_rels drop constraint membership_rel_mem_ck; alter table membership_rels add CONSTRAINT membership_rel_mem_ck CHECK ((((((((member_state)::text = 'merged'::text) OR ((member_state)::text = 'approved'::text)) OR ((member_state)::text = 'needs approval'::text)) OR ((member_state)::text = 'banned'::text)) OR ((member_state)::text = 'rejected'::text)) OR ((member_state)::text = 'deleted'::text) OR ((member_state)::text = 'request approval'::text) OR ((member_state)::text = 'request approved'::text) OR ((member_state)::text = 'waitinglist approved'::text) OR ((member_state)::text = 'awaiting payment'::text) OR ((member_state)::text = 'payment received'::text))); Index: openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl 15 Aug 2005 08:47:38 -0000 1.16 +++ openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl 20 Aug 2005 18:27:54 -0000 1.17 @@ -113,7 +113,7 @@ 1 \ number } - 0.1d6 0.1d7 { + 0.1d6 0.1d7 { apm_parameter_register \ GradePrerequisitesP \ "Set this to 1 if you want participants to be verified against the Grade requirement for a section." \ @@ -127,7 +127,28 @@ dotlrn-ecommerce \ 0 \ number + } + 0.1d7 0.1d8 { + apm_parameter_register \ + GroupPurchaseP \ + "Allow purchasing for groups." \ + dotlrn-ecommerce \ + 1 \ + number + apm_parameter_register \ + AllowSettingRelationshipsP \ + "Support setting of related users." \ + dotlrn-ecommerce \ + 1 \ + number + + apm_parameter_register \ + OfferCodesP \ + "Support asking for offer codes for discount prices." \ + dotlrn-ecommerce \ + 0 \ + number } } } Index: openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl 18 Aug 2005 14:30:28 -0000 1.22 +++ openacs-4/packages/dotlrn-ecommerce/tcl/section-procs.tcl 20 Aug 2005 18:27:54 -0000 1.23 @@ -151,7 +151,7 @@ @error } { db_1row section_info { - select community_id, course_id as item_id + select community_id, course_id as item_id, product_id from dotlrn_ecommerce_section where section_id = :section_id } @@ -178,7 +178,7 @@ util_memoize_flush [list dotlrn_ecommerce::section::member_price $section_id] util_memoize_flush [list dotlrn_ecommerce::section::application_assessment $section_id] util_memoize_flush [list dotlrn_ecommerce::section::section_zones $community_id] - + util_memoize_flush [list dotlrn_ecommerce::section::has_discount_p $product_id] if { [exists_and_not_null user_id] } { util_memoize_flush [list dotlrn_ecommerce::section::member_state $user_id $community_id] util_memoize_flush [list dotlrn_ecommerce::section::waiting_list_number $user_id $community_id] @@ -670,3 +670,22 @@ ad_schedule_proc -thread t 600 dotlrn_ecommerce::section::check_expired_orders } + +ad_proc -public dotlrn_ecommerce::section::has_discount_p { + product_id +} { + Check if there's a current promotion for the product + + @author Roel Canicula (roelmc@pldtdsl.net) + @creation-date 2005-08-20 + + @return + + @error +} { + return [db_string discount_codes { + select count(*) + from ec_sale_prices_current + where product_id=:product_id + } -default 0] +} Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/offer-code-set.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/offer-code-set.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/offer-code-set.tcl 20 Aug 2005 18:27:54 -0000 1.1 @@ -0,0 +1,59 @@ +# packages/dotlrn-ecommerce/www/ecommerce/offer-code-set.tcl + +ad_page_contract { + + Set offer code + + @author Roel Canicula (roelmc@pldtdsl.net) + @creation-date 2005-08-20 + @arch-tag: eaad10fa-7003-47e9-b633-f9d45587751b + @cvs-id $Id: offer-code-set.tcl,v 1.1 2005/08/20 18:27:54 roelc Exp $ +} { + user_id:integer,notnull,optional + product_id:integer,notnull + offer_code + return_url:notnull +} -properties { +} -validate { +} -errors { +} + +if { ![exists_and_not_null user_id] } { + set user_id [ad_verify_and_get_user_id] +} + +set user_session_id [ec_get_user_session_id] +ec_create_new_session_if_necessary [export_url_vars product_id offer_code return_url] + +if { ! [empty_string_p $offer_code] } { + if { [db_string get_offer_code_p " + select count(*) + from ec_user_session_offer_codes + where user_session_id=:user_session_id + and product_id=:product_id"] == 0 } { + db_dml inert_uc_offer_code " + insert into ec_user_session_offer_codes + (user_session_id, product_id, offer_code) + values + (:user_session_id, :product_id, :offer_code)" + } else { + db_dml update_ec_us_offers " + update ec_user_session_offer_codes + set offer_code = :offer_code + where user_session_id = :user_session_id + and product_id = :product_id" + } + + set original_price [lindex [ec_lowest_price_and_price_name_for_an_item $product_id $user_id] 0] + set discounted_price [lindex [ec_lowest_price_and_price_name_for_an_item $product_id $user_id $offer_code] 0] + if { ($original_price - $discounted_price) != 0 } { + set savings [ec_pretty_price [expr $original_price - $discounted_price]] + set message "[_ dotlrn-ecommerce.lt_The_offer_code_was_ac]" + } else { + set message "[_ dotlrn-ecommerce.lt_Sorry_the_offer_code_]" + } + + ad_returnredirect -message $message $return_url +} else { + ad_returnredirect $return_url +} 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 -r1.15 -r1.16 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl 18 Aug 2005 18:40:37 -0000 1.15 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-add.tcl 20 Aug 2005 18:27:54 -0000 1.16 @@ -25,19 +25,51 @@ @revision-date April 2002 } { - product_id:integer + product_id:integer,optional {item_count 1} {size_choice ""} {color_choice ""} {style_choice ""} usca_p:optional - user_id:integer,notnull + user_id:integer,notnull,optional {participant_id:integer 0} {override_p 0} + + offer_code:optional + return_url:notnull,optional } +set user_session_id [ec_get_user_session_id] +ec_create_new_session_if_necessary [export_url_vars product_id user_id participant_id item_count offer_code return_url] + +if { [info exists offer_code] } { + if { ! [exists_and_not_null product_id] && ! [exists_and_not_null user_id] } { + ad_returnredirect [export_vars -base $return_url { offer_code }] + ad_script_abort + } + + if { [db_string get_offer_code_p " + select count(*) + from ec_user_session_offer_codes + where user_session_id=:user_session_id + and product_id=:product_id"] == 0 } { + db_dml inert_uc_offer_code " + insert into ec_user_session_offer_codes + (user_session_id, product_id, offer_code) + values + (:user_session_id, :product_id, :offer_code)" + } else { + db_dml update_ec_us_offers " + update ec_user_session_offer_codes + set offer_code = :offer_code + where user_session_id = :user_session_id + and product_id = :product_id" + } + +} + # avoid anonymous participants if {$user_id == 0} { set user_id [auth::require_login] @@ -115,7 +147,7 @@ set cancel_url [set return_url [export_vars -base [ad_conn package_url]admin/process-purchase-course { user_id }]] } else { set return_url [export_vars -base [ad_conn package_url]application-confirm { product_id {member_state "needs approval"} }] - set cancel_url .. + set cancel_url [ad_conn package_url] } ad_returnredirect [export_vars -base waiting-list-confirm { product_id user_id participant_id return_url cancel_url }] ad_script_abort @@ -189,8 +221,6 @@ # the shopping cart page (shopping-cart.tcl) # 5. ad_returnredirect them to their shopping cart -set user_session_id [ec_get_user_session_id] -ec_create_new_session_if_necessary [export_url_vars product_id user_id participant_id item_count] set n_confirmed_orders [db_string get_n_confirmed_orders " select count(*) from ec_orders Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-delete-from.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-delete-from.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-delete-from.tcl 11 Aug 2005 01:03:09 -0000 1.4 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart-delete-from.tcl 20 Aug 2005 18:27:54 -0000 1.5 @@ -81,7 +81,7 @@ # Flush cache if { [db_0or1row section_from_product { select section_id - from dlec_view_sections + from dotlrn_ecommerce_section where product_id = :product_id }] } { dotlrn_ecommerce::section::flush_cache $section_id 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.9 -r1.10 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.adp 17 Aug 2005 09:31:58 -0000 1.9 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.adp 20 Aug 2005 18:27:54 -0000 1.10 @@ -20,8 +20,6 @@
-
- @@ -32,6 +30,9 @@ + + + @@ -69,6 +70,19 @@ + + + + + + @@ -83,6 +97,9 @@ + + + @@ -139,7 +156,6 @@ @shipping_options;noquote@ -
Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.tcl 11 Aug 2005 13:10:52 -0000 1.9 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/shopping-cart.tcl 20 Aug 2005 18:27:54 -0000 1.10 @@ -144,7 +144,7 @@ # p.no_shipping_avail_p, p.shipping, p.shipping_additional, p.weight # basically collect shipping information for any items where ec_products.no_shipping_avail_p = 't' -db_multirow -extend { line_subtotal patron_name participant_name participant_type edit_url } in_cart get_products_in_cart " +db_multirow -extend { line_subtotal patron_name participant_name participant_type edit_url has_discount_p } in_cart get_products_in_cart " select p.product_name, p.one_line_description, p.no_shipping_avail_p, p.shipping, p.shipping_additonal, p.weight, p.product_id, count(*) as quantity, u.offer_code, i.color_choice, i.size_choice, i.style_choice, '' as price from ec_orders o join ec_items i on (o.order_id=i.order_id) @@ -177,6 +177,9 @@ set start_applying_discount_p 0 set multi_item_discount [parameter::get -parameter MultipleItemDiscountAmount -default 5] +# Check if we allow offer codes +set offer_code_p [parameter::get -parameter OfferCodesP -default 0] + for {set i 1} {$i <= [template::multirow size in_cart]} {incr i} { set product_name [template::multirow get in_cart $i product_name] @@ -267,6 +270,12 @@ template::multirow set in_cart $i delete_export_vars $delete_export_vars template::multirow set in_cart $i price "[lindex $lowest_price_and_price_name 1]:  [ec_pretty_price [lindex $lowest_price_and_price_name 0] $currency]" + # See if we have an offer code for this product + if { $offer_code_p && ([empty_string_p $offer_code] || ([lindex [ec_lowest_price_and_price_name_for_an_item $product_id $user_id] 0] - $lowest_price) == 0) } { + set has_discount_p [dotlrn_ecommerce::section::has_discount_p $product_id] + incr offer_code_p $has_discount_p + template::multirow set in_cart $i has_discount_p $has_discount_p + } } # Add adjust quantities line if there are products in the cart.
#dotlrn-ecommerce.Item_Description##dotlrn-ecommerce.Quantity# #dotlrn-ecommerce.PriceItem# #dotlrn-ecommerce.Subtotal_1# #dotlrn-ecommerce.Discount# #dotlrn-ecommerce.Action#
@in_cart.price;noquote@ @in_cart.line_subtotal@ + + + + + + + #dotlrn-ecommerce.delete# @pretty_total_price@