Forum .LRN Q&A: Error Showing Shopping Cart

Collapse
Posted by Felix Paco on
Hi all,

I encountered with the following error when I'm trying to see my shopping cart with dotlrn-ecommerce:

expected boolean value but got ""
while executing
"if { [ad_parameter -package_id [ec_id] UserClassApproveP ecommerce] } {
set additional_user_class_restriction "and m.user_class_approved_p = 't'"
..."
(procedure "ec_lowest_price_and_price_name_for_an_item" line 10)
invoked from within
"ec_lowest_price_and_price_name_for_an_item $product_id $user_id $offer_code"
(procedure "ec_price_line" line 3)
invoked from within
"ec_price_line $product_id $user_id $offer_code"
("for" body line 29)
invoked from within
"for {set i 1} {$i <= [template::multirow size in_cart]} {incr i} {

set product_name [template::multirow get in_cart $i product_name]
set one_..."
("uplevel" body line 184)
invoked from within
"uplevel {
ad_page_contract {
@param usca_p User session begun or not

@author
@creation-date
@author ported by Jerry Asher (jer..."
(procedure "code::tcl::/var/www/dotlrn-2.3.1/packages/dotlrn-ecommerce/w..." line 2)
invoked from within
"code::tcl::$__adp_stub"
invoked from within
"if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
invoked from within
"uplevel {

if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init t..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare"
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 5)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file "$root/$path""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$path"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl_url2path_info..."

The same error happened when I try to register for a course in dotlrn-ecommerce.

Thanks in advance.

Collapse
Posted by Dave Bauer on
Check to see if that parameter is set.

UserClassApproveP in the ecommerce package.

Another option is to set a default in that code

by changing the if to this:

"if { [ad_parameter -package_id [ec_id] UserClassApproveP ecommerce 0] } {