#if($advancedsearch) #set($hits = $advancedsearch) $context.putPageValue("hits",$hits) #end ### set this to true if debugging #set($showproductid = false) ###figure out if suppliername or alternate was specified in form #set($generatereport = false) #set($terms = $hits.getSearchQuery().getTerms()) #foreach($term in $terms) #if($term.getId() == "suppliername" || $term.getId() == "alternate") #set($generatereport = true) #end #end
#if($showproductid)#end #foreach($product in $hits.getPageOfHits()) #set($supplier = $mediaarchive.getData("supplier",$product.suppliername)) #set($supplier2 = $mediaarchive.getData("supplier",$product.alternate)) #set($price = $product.price) #set($pricestr = "") #set($idx = $price.indexOf(".")) #if($idx == -1) #set($pricestr = "$${price}.00") #else #set($len = $price.length()) #set($diff = $len - $idx) #if ($diff == 2) #set($pricestr = "$${price}0") #else #set($pricestr = "$$!{price}") #end #end #if($showproductid)#end #set($supplier = "") #set($supplier2 = "") #end #if($hits.isEmpty() == false && $generatereport)

#end $context.putPageValue("targetdiv","search-results-pages") $context.putPageValue("resultsPage","/${applicationid}/manage/products/search/detailstablepages.html?oemaxlevel=1&") $pages.include("/${applicationid}/manage/products/search/pages.html",$context)