Index: openacs-4/packages/ecommerce/www/product-search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/product-search.adp,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/ecommerce/www/product-search.adp 8 Mar 2004 19:46:11 -0000 1.5 +++ openacs-4/packages/ecommerce/www/product-search.adp 22 Dec 2004 20:57:39 -0000 1.5.2.1 @@ -1,5 +1,5 @@ - @category_name;noquote@ + @category_name@ @context_bar;noquote@ @ec_system_owner;noquote@ Index: openacs-4/packages/ecommerce/www/product-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/product-search.tcl,v diff -u -r1.6 -r1.6.4.1 --- openacs-4/packages/ecommerce/www/product-search.tcl 10 Dec 2002 20:06:18 -0000 1.6 +++ openacs-4/packages/ecommerce/www/product-search.tcl 22 Dec 2004 20:57:39 -0000 1.6.4.1 @@ -22,6 +22,11 @@ set user_id [ad_verify_and_get_user_id] +# Is search request originating from a page from this site? +# if not, cookies are created for each image, so consider skiping presenting images +# when referrer is not this site. A better solution would be +# to move the product images to a /resources dir + # user session tracking set user_session_id [ec_get_user_session_id] @@ -44,6 +49,9 @@ set subcategory_id "" } +# filter overflow attempts from really long search strings +set search_text "[string range $search_text 0 100 ]" + ec_create_new_session_if_necessary [export_url_vars category_id search_text] cookies_are_not_required if { [string compare $user_session_id "0"] != 0 } { db_dml insert_search_text_to_session_info "insert into ec_user_session_info (user_session_id, category_id, search_text) values (:user_session_id, :category_id, :search_text)" @@ -107,9 +115,9 @@ if { $search_count == 0 } { set search_results "No products found." } else { - set search_results " $search_count item[ec_decode $search_count "1" "" "s"] found.

$search_string" + set search_results "

$search_count [ec_decode $search_count "1" "item found." "items found, most relevant first."]

$search_string" } -set context_bar [template::adp_parse [acs_root_dir]/packages/[ad_conn package_key]/www/contextbar [list context_addition [list "$category_name"]]] +set context_bar [template::adp_parse [acs_root_dir]/packages/[ad_conn package_key]/www/contextbar [list context_addition [list "[ec_system_name] search results"]]] set ec_system_owner [ec_system_owner] db_release_unused_handles Index: openacs-4/packages/ecommerce/www/product.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/product.adp,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/ecommerce/www/product.adp 8 Mar 2004 19:46:11 -0000 1.4 +++ openacs-4/packages/ecommerce/www/product.adp 22 Dec 2004 20:57:39 -0000 1.4.2.1 @@ -3,6 +3,11 @@ @context_bar;noquote@ @ec_system_owner;noquote@ + @combocategory_id@ + @search_text@ + @category_id@ + @subcategory_id@ + t @formatted_product;noquote@ Index: openacs-4/packages/ecommerce/www/product.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/product.tcl,v diff -u -r1.7 -r1.7.4.1 --- openacs-4/packages/ecommerce/www/product.tcl 10 Dec 2002 20:06:18 -0000 1.7 +++ openacs-4/packages/ecommerce/www/product.tcl 22 Dec 2004 20:57:39 -0000 1.7.4.1 @@ -19,6 +19,10 @@ offer_code:optional comments_sort_by:optional usca_p:optional + search_text:optional + combocategory_id:optional + category_id:optional + subcategory_id:optional } @@ -27,6 +31,10 @@ if { ![info exists comments_sort_by] } { set comments_sort_by "" } +if [template::util::is_nil category_id] { set category_id "" } +if [template::util::is_nil subcategory_id] { set subcategory_id "" } +if [template::util::is_nil search_text] { set search_text "" } +if [template::util::is_nil combocategory_id] { set combocategory_id "" } # Users don't need to be logged in but if they are the could get a # lower price @@ -77,6 +85,7 @@ [ad_header "Product Not Found"]

The product you have requested was not found in the database.

Please contact [ec_system_owner] to report the error.

" + ns_log Warning "product.tcl,line88: product_id $product_id_temp requested, not found." return }