Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl,v diff -u -r1.29 -r1.30 --- openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl 9 Aug 2008 11:57:43 -0000 1.29 +++ openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl 11 Oct 2008 10:51:38 -0000 1.30 @@ -107,15 +107,8 @@ ad_proc -private ec_url_mem { } { } { - if {[db_table_exists apm_packages]} { - return [db_string ec_mountpoint " - select site_node.url(s.node_id) - from site_nodes s, apm_packages a - where s.object_id = a.package_id - and a.package_key = 'ecommerce'" -default 0] - } else { - return 0 - } + return [apm_package_url_from_key ecommerce] + } ### the url to get to ec @@ -522,15 +515,14 @@ append sort_blurb "sorted by date | sort by rating" } - set to_return "
+ [ad_system_name] member reviews:
" - set comments_to_print "" + set comments_to_print "- " +
Average customer review [ec_display_rating [db_string avg_rating_select {
select avg(rating) from ec_product_comments where product_id = :product_id and approved_p = 't'
}]]
Number of reviews: [db_string n_reviews_select "
select count(*) from ec_product_comments where product_id = :product_id and (approved_p='t' [ec_decode [ad_parameter -package_id [ec_id] ProductCommentsNeedApprovalP ecommerce] "0" "or approved_p is null" ""])
- "] ($sort_blurb)
-
-
- + "] ($sort_blurb)
$comments_to_print - -- - Write your own review! - " +
" } else { - append to_return "\nBe the first to review this product!\n" + append to_return "
\n" } return $to_return