Index: openacs-4/packages/ecommerce/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/index.tcl,v
diff -u -r1.6.2.3 -r1.6.2.4
--- openacs-4/packages/ecommerce/www/index.tcl 11 Jun 2005 05:39:51 -0000 1.6.2.3
+++ openacs-4/packages/ecommerce/www/index.tcl 27 Sep 2005 09:03:39 -0000 1.6.2.4
@@ -14,7 +14,7 @@
} {
usca_p:optional
- {how_many:naturalnum {[ad_parameter -package_id [ec_id] ProductsToDisplayPerPage ecommerce]}}
+ {how_many:naturalnum {[parameter::get -parameter ProductsToDisplayPerPage -package_id [ec_id] -default 10 ]}}
{start_row "0"}
}
@@ -54,7 +54,7 @@
set recommendations_if_there_are_any "
"
-if [ad_parameter -package_id [ec_id] UserClassApproveP ecommerce] {
+if {[parameter::get -parameter UserClassApproveP -package_id [ec_id] -default 1 ]} {
set user_class_approved_p_clause "and user_class_approved_p = 't'"
} else {
set user_class_approved_p_clause ""
@@ -68,19 +68,19 @@
and subcategory_id is null
and subsubcategory_id is null
and (r.user_class_id is null or r.user_class_id in (select user_class_id
- from ec_user_class_user_map
- where user_id = :user_id
- $user_class_approved_p_clause))
+ from ec_user_class_user_map
+ where user_id = :user_id
+ $user_class_approved_p_clause))
and r.active_p='t'" {
append recommendations_if_there_are_any "
-
-
- [ec_linked_thumbnail_if_it_exists $dirname "f" "t"] |
+
+
+ [ec_linked_thumbnail_if_it_exists $dirname "f" "t"] |
$product_name
- $recommendation_text
- |
- [ec_price_line $product_id $user_id $offer_code] |
+ $recommendation_text
+
+ [ec_price_line $product_id $user_id $offer_code] |
"
}
if {[string equal $recommendations_if_there_are_any ""]} {
@@ -114,9 +114,9 @@
$product_name |
- |
- $one_line_description |
- [ec_price_line $product_id $user_id $offer_code] |
+ |
+ $one_line_description |
+ [ec_price_line $product_id $user_id $offer_code] |
"
incr count
@@ -146,9 +146,9 @@
} else {
set number_of_remaining_products [expr $product_count - $start_row - $how_many]
if { $number_of_remaining_products > 0 } {
- set next_link "Next $number_of_remaining_products"
+ set next_link "Next $number_of_remaining_products"
} else {
- set next_link ""
+ set next_link ""
}
}