Code:
<?xml version="1.0" standalone="yes" ?>
<!-- ################################################################################## -->
<!-- Copyright AspDotNetStorefront.com. All Rights Reserved. -->
<!-- http://www.aspdotnetstorefront.com -->
<!-- For details on this license please visit the product homepage at the URL above. -->
<!-- THE ABOVE NOTICE MUST REMAIN INTACT. -->
<!-- ################################################################################## -->
<!-- ################################################################################## -->
<!-- Copyright AspDotNetStorefront.com. All Rights Reserved. -->
<!-- http://www.aspdotnetstorefront.com -->
<!-- For details on this license please visit the product homepage at the URL above. -->
<!-- THE ABOVE NOTICE MUST REMAIN INTACT. -->
<!-- ################################################################################## -->
<package version="2.1" displayname="Advanced Search Form" debug="false" includeentityhelper="true">
<query name="Products" rowElementName="Product" runif="SearchTerm">
<sql>
<![CDATA[
exec aspdnsf_GetProducts
@categoryID = @CatID,
@sectionID = @SecID,
@manufacturerID = @ManID,
@distributorID = @DistID,
@localeName = @locale,
@CustomerLevelID = @CustLevelID,
@affiliateID = @AffID,
@ProductTypeID = @ProdTypeID,
@ViewType = 0,
@pagenum = 1,
@pagesize = 2147483647,
@StatsFirst = 0,
@searchstr = @SearchTerm,
@extSearch = @SearchDescriptions,
@publishedonly = 1,
@ExcludePacks = 0,
@ExcludeKits = 0,
@ExcludeSysProds = 1,
@storeID = @StoreID,
@filterProduct = @FilterProduct
]]>
</sql>
<queryparam paramname="@CatID" paramtype="request" requestparamname="CategoryID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@SecID" paramtype="request" requestparamname="SectionID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@ManID" paramtype="request" requestparamname="ManufacturerID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@DistID" paramtype="request" requestparamname="DistributorID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@locale" paramtype="runtime" requestparamname="LocaleSetting" sqlDataType="varchar" defvalue="en-US" validationpattern="" />
<queryparam paramname="@CustLevelID" paramtype="runtime" requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@AffID" paramtype="runtime" requestparamname="AffiliateID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@ProdTypeID" paramtype="request" requestparamname="ProductTypeID" sqlDataType="int" defvalue="null" validationpattern="" />
<queryparam paramname="@SearchTerm" paramtype="request" requestparamname="SearchTerm" sqlDataType="varchar" defvalue="" validationpattern="" />
<queryparam paramname="@SearchDescriptions" paramtype="request" requestparamname="SearchDescriptions" sqlDataType="tinyint" defvalue="1" validationpattern="" />
<queryparam paramname="@StoreID" paramtype="runtime" requestparamname="StoreID" sqlDataType="int" defvalue="1" validationpattern="" />
<queryparam paramname="@FilterProduct" paramtype="runtime" requestparamname="FilterProduct" sqlDataType="bit" defvalue="0" validationpattern="" />
</query>
<query name="Categories" rowElementName="Category" runif="SearchTerm">
<sql>
<![CDATA[
exec aspdnsf_SearchCategories @SearchTerm, @CatID, @StoreID, @FilterEntity
]]>
</sql>
<queryparam paramname="@SearchTerm" paramtype="request" requestparamname="SearchTerm" sqlDataType="varchar" defvalue="" validationpattern="" />
<queryparam paramname="@CatID" paramtype="request" requestparamname="CategoryID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@StoreID" paramtype="runtime" requestparamname="StoreID" sqlDataType="int" defvalue="1" validationpattern="" />
<queryparam paramname="@FilterEntity" paramtype="runtime" requestparamname="FilterEntity" sqlDataType="bit" defvalue="0" validationpattern="" />
</query>
<query name="Sections" rowElementName="Section" runif="SearchTerm">
<sql>
<![CDATA[
exec aspdnsf_SearchSections @SearchTerm, @SecID, @StoreID, @FilterEntity
]]>
</sql>
<queryparam paramname="@SearchTerm" paramtype="request" requestparamname="SearchTerm" sqlDataType="varchar" defvalue="" validationpattern="" />
<queryparam paramname="@SecID" paramtype="request" requestparamname="SectionID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@StoreID" paramtype="runtime" requestparamname="StoreID" sqlDataType="int" defvalue="1" validationpattern="" />
<queryparam paramname="@FilterEntity" paramtype="runtime" requestparamname="FilterEntity" sqlDataType="bit" defvalue="0" validationpattern="" />
</query>
<query name="Manufacturers" rowElementName="Manufacturer" runif="SearchTerm">
<sql>
<![CDATA[
exec aspdnsf_SearchManufacturers @SearchTerm, @ManID, @StoreID, @FilterEntity
]]>
</sql>
<queryparam paramname="@SearchTerm" paramtype="request" requestparamname="SearchTerm" sqlDataType="varchar" defvalue="" validationpattern="" />
<queryparam paramname="@ManID" paramtype="request" requestparamname="ManufacturerID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@StoreID" paramtype="runtime" requestparamname="StoreID" sqlDataType="int" defvalue="1" validationpattern="" />
<queryparam paramname="@FilterEntity" paramtype="runtime" requestparamname="FilterEntity" sqlDataType="bit" defvalue="0" validationpattern="" />
</query>
<query name="Distributors" rowElementName="Distributor" runif="SearchTerm">
<sql>
<![CDATA[
exec aspdnsf_SearchDistributors @SearchTerm, @DistributorID, @StoreID, @FilterEntity
]]>
</sql>
<queryparam paramname="@SearchTerm" paramtype="request" requestparamname="SearchTerm" sqlDataType="varchar" defvalue="" validationpattern="" />
<queryparam paramname="@DistributorID" paramtype="request" requestparamname="DistributorID" sqlDataType="int" defvalue="0" validationpattern="" />
<queryparam paramname="@StoreID" paramtype="runtime" requestparamname="StoreID" sqlDataType="int" defvalue="1" validationpattern="" />
<queryparam paramname="@FilterEntity" paramtype="runtime" requestparamname="FilterEntity" sqlDataType="bit" defvalue="0" validationpattern="" />
</query>
<query name="ProductTypes" rowElementName="ProductType">
<sql>
<![CDATA[
select ProductTypeID, Name, DisplayOrder from ProductType with (nolock) order by DisplayOrder,Name
]]>
</sql>
</query>
<PackageTransform>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
<xsl:output method="html" omit-xml-declaration="yes" />
<xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
<xsl:param name="WebConfigLocaleSetting" select="/root/Runtime/WebConfigLocaleSetting" />
<xsl:param name="MinPriceDisplay">
<xsl:choose>
<xsl:when test="/root/QueryString/minprice!=''">
<xsl:value-of select="/root/QueryString/minprice" />
</xsl:when>
<xsl:when test="/root/Form/minprice!=''">
<xsl:value-of select="/root/Form/minprice" />
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="MinPrice">
<xsl:choose>
<xsl:when test="/root/QueryString/minprice!=''">
<xsl:value-of select="/root/QueryString/minprice" />
</xsl:when>
<xsl:when test="/root/Form/minprice!=''">
<xsl:value-of select="/root/Form/minprice" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="MaxPriceDisplay">
<xsl:choose>
<xsl:when test="/root/QueryString/maxprice!=''">
<xsl:value-of select="/root/QueryString/maxprice" />
</xsl:when>
<xsl:when test="/root/Form/maxprice!=''">
<xsl:value-of select="/root/Form/maxprice" />
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="MaxPrice">
<xsl:choose>
<xsl:when test="/root/QueryString/maxprice!=''">
<xsl:value-of select="/root/QueryString/maxprice" />
</xsl:when>
<xsl:when test="/root/Form/maxprice!=''">
<xsl:value-of select="/root/Form/maxprice" />
</xsl:when>
<xsl:otherwise>9999999999</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="SearchTerm">
<xsl:choose>
<xsl:when test="/root/QueryString/searchterm!=''">
<xsl:value-of select="/root/QueryString/searchterm" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/root/Form/searchterm" />
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:variable name="ProductIdsOnPage">
<xsl:for-each select="/root/Products/Product/ProductID">
<xsl:value-of select="." />
<xsl:if test="position() != last()">
<xsl:text>,</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="AvailablePromotions" select="aspdnsf:XmlPackageAsXml('availablePromotions.xml.config', concat('productIdList=', $ProductIdsOnPage))/root/Promotions" />
<xsl:param name="ShowPics">
<xsl:choose>
<xsl:when test="/root/QueryString/showpics!=''">
<xsl:value-of select="/root/QueryString/showpics" />
</xsl:when>
<xsl:when test="/root/Form/showpics!=''">
<xsl:value-of select="/root/Form/showpics" />
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name="SearchDescriptions">
<xsl:choose>
<xsl:when test="/root/QueryString/searchdescriptions!=''">
<xsl:value-of select="/root/QueryString/searchdescriptions" />
</xsl:when>
<xsl:when test="/root/Form/searchdescriptions!=''">
<xsl:value-of select="/root/Form/searchdescriptions" />
</xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:template match="/">
<xsl:param name="oneProductID">
<xsl:value-of select="/root/Products/Product[1]/ProductID/text()" />
</xsl:param>
<xsl:param name="oneSEName">
<xsl:value-of select="/root/Products/Product[1]/SEName/text()" />
</xsl:param>
<link rel="stylesheet" type="text/css" href='/DataTables/media/css/jquery.dataTables.css' />
<script type="text/javascript" src="/DataTables/media/js/jquery.dataTables.min.js" />
<script type="text/javascript">
$(document).ready(function () {
//$(window).load(function() {
$("#productResults").dataTable({
"oLanguage": {
"sSearch": "Filter records:"
},
"aaSorting": [
[1, "asc"]
],
"aoColumnDefs": [{
"bSortable": false,
"aTargets": [-1]
}],
"bPaginate": true
});
});
</script>
<xsl:if test="count(/root/Products/Product)=1">
<script type="text/javascript" Language="JavaScript">
window.location.href = '<xsl:value-of select="aspdnsf:ProductLink($oneProductID, $oneSEName, 0)" />';
</script>
</xsl:if>
<xsl:value-of select="aspdnsf:Topic('SearchPageHeader')" disable-output-escaping="yes" />
<p>
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.2', $LocaleSetting)" disable-output-escaping="yes" />
</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr align="left">
<td width="25%" align="right" valign="middle">
<input type="hidden" name="IsSubmit" value="true" />
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.3', $LocaleSetting)" />  
</td>
<td align="left">
<input type="text" name="SearchTerm" size="35" maxlength="70" value="{$SearchTerm}" onkeydown="if(myKeyCode(event)==13)loadNewSearch(this); if(myKeyCode(event)==13)return(false);" onkeyup="tSearch(this);" onblur="tSearch(this, true);" onfocus="tSearch(this);" autocomplete="off" />
<input type="hidden" name="SearchTerm_Vldt">
<xsl:attribute name="value">[req][len=<xsl:value-of select="aspdnsf:AppConfig('MinSearchStringLength')" />][blankalert=<xsl:value-of select="aspdnsf:StringResource('search.aspx.4', $LocaleSetting)" disable-output-escaping="yes" />]</xsl:attribute>
</input>
</td>
</tr>
<tr valign="middle">
<td width="25%" align="right" valign="middle">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.4', $LocaleSetting)" />  
</td>
<td align="left">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.5', $LocaleSetting)"/> <input TYPE="RADIO" NAME="SearchDescriptions" value="1" ><xsl:if test="$SearchDescriptions = 1 or not(boolean($SearchDescriptions))"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input>
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.6', $LocaleSetting)"/> <input TYPE="RADIO" NAME="SearchDescriptions" value="0" ><xsl:if test="$SearchDescriptions = 0"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input>
</td>
</tr>
<xsl:if test="aspdnsf:AppConfigBool('SearchAdv_ShowProductType')='true'">
<tr valign="middle">
<td align="right" valign="middle">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.7', $LocaleSetting)" />  
</td>
<td align="left">
<select size="1" name="ProductTypeID">
<option value="0">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.8', $LocaleSetting)" disable-output-escaping="yes" />
</option>
<xsl:apply-templates select="/root/ProductTypes/ProductType" />
</select>
</td>
</tr>
</xsl:if>
<xsl:if test="aspdnsf:AppConfigBool('SearchAdv_ShowCategory')='true'">
<tr valign="middle">
<td align="right" valign="middle">
<xsl:value-of select="aspdnsf:StringResource('AppConfig.CategoryPromptSingular', $LocaleSetting)" />:  
</td>
<td align="left">
<select onChange="theForm.submit()" size="1" name="CategoryID">
<option value="0">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.9', $LocaleSetting)" disable-output-escaping="yes" />
</option>
<xsl:for-each select="/root/EntityHelpers/Category/Entity">
<xsl:call-template name="EntityOption">
<xsl:with-param name="selected" select="/root/Form/categoryid" />
</xsl:call-template>
</xsl:for-each>
</select>
</td>
</tr>
</xsl:if>
<xsl:if test="aspdnsf:AppConfigBool('SearchAdv_ShowSection')='true'">
<tr valign="middle">
<td align="right" valign="middle">
<xsl:value-of select="aspdnsf:StringResource('AppConfig.SectionPromptSingular', $LocaleSetting)" />:  
</td>
<td align="left">
<select onChange="theForm.submit()" size="1" name="SectionID">
<option value="0">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.9', $LocaleSetting)" disable-output-escaping="yes" />
</option>
<xsl:for-each select="/root/EntityHelpers/Section/Entity">
<xsl:call-template name="EntityOption">
<xsl:with-param name="selected" select="/root/Form/sectionid" />
</xsl:call-template>
</xsl:for-each>
</select>
</td>
</tr>
</xsl:if>
<xsl:if test="aspdnsf:AppConfigBool('SearchAdv_ShowManufacturer')='true'">
<tr valign="middle">
<td align="right" valign="middle">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.18', $LocaleSetting)" disable-output-escaping="yes" />  
</td>
<td align="left">
<select onChange="theForm.submit()" size="1" name="ManufacturerID">
<option value="0">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.9', $LocaleSetting)" disable-output-escaping="yes" />
</option>
<xsl:for-each select="/root/EntityHelpers/Manufacturer/Entity">
<xsl:call-template name="EntityOption">
<xsl:with-param name="selected" select="/root/Form/manufacturerid" />
</xsl:call-template>
</xsl:for-each>
</select>
</td>
</tr>
</xsl:if>
<xsl:if test="aspdnsf:AppConfigBool('SearchAdv_ShowDistributor')='true'">
<tr valign="middle">
<td align="right" valign="middle">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.22', $LocaleSetting)" disable-output-escaping="yes" />  
</td>
<td align="left">
<select onChange="theForm.submit()" size="1" name="DistributorID">
<option value="0">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.9', $LocaleSetting)" disable-output-escaping="yes" />
</option>
<xsl:for-each select="/root/EntityHelpers/Distributor/Entity">
<xsl:call-template name="EntityOption">
<xsl:with-param name="selected" select="/root/Form/distributorid" />
</xsl:call-template>
</xsl:for-each>
</select>
</td>
</tr>
</xsl:if>
<!-- Display Images -->
<tr valign="middle">
<td width="25%" align="right" valign="middle">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.11', $LocaleSetting)" disable-output-escaping="yes" />  
</td>
<td align="left">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.5', $LocaleSetting)"/> <input TYPE="RADIO" NAME="ShowPics" value="1" ><xsl:if test="$ShowPics = 1 or not(boolean($ShowPics))"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input>
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.6', $LocaleSetting)"/> <input TYPE="RADIO" NAME="ShowPics" value="0" ><xsl:if test="$ShowPics = 0"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input>
</td>
</tr>
<xsl:if test="aspdnsf:AppConfigBool('SearchAdv_ShowPriceRange')='true'">
<tr valign="middle">
<td width="25%" align="right" valign="middle">
<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.12', $LocaleSetting)" />  
</td>
<td align="left">
<input maxLength="10" size="10" name="MinPrice" value="{$MinPriceDisplay}"></input>
<input type="hidden" name="MinPrice_vldt"><xsl:attribute name="value">[number][invalidalert=<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.13', $LocaleSetting)" disable-output-escaping="yes" />]</xsl:attribute></input>
   <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.14', $LocaleSetting)" />  
<input maxLength="10" size="10" name="MaxPrice" value="{$MaxPriceDisplay}"></input>
<input type="hidden" name="MaxPrice_vldt"><xsl:attribute name="value">[number][invalidalert=<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.13', $LocaleSetting)" disable-output-escaping="yes" />]</xsl:attribute></input>
</td>
</tr>
</xsl:if>
<tr>
<td></td>
<td align="left">
<br/>
<script type="text/javascript" Language="JavaScript">
function loadNewSearch(myForm) {
var f = myForm.form;
var queryString;
if (f.SearchTerm.value != '') {
queryString = '?SearchTerm=' + f.SearchTerm.value;
if (getCheckedRadio(f.SearchDescriptions).value != '1') {
queryString += '&SearchDescriptions=' + getCheckedRadio(f.SearchDescriptions).value;
}
if (getCheckedRadio(f.ShowPics).value != '1') {
queryString += '&ShowPics=' + getCheckedRadio(f.ShowPics).value;
}
if (f.MaxPrice.value != '') {
queryString += '&MaxPrice=' + f.MaxPrice.value;
}
if (f.MinPrice.value != '') {
queryString += '&MinPrice=' + f.MinPrice.value;
}
if (f.CategoryID.value != '0') {
queryString += '&CatID=' + f.CategoryID.value;
}
if (f.SectionID.value != '0') {
queryString += '&SecID=' + f.SectionID.value;
}
if (f.ManufacturerID.value != '0') {
queryString += '&ManID=' + f.ManufacturerID.value;
}
if (f.DistributorID.value != '0') {
queryString += '&DistID=' + f.DistributorID.value;
}
if (f.ProductTypeID.value != '0') {
queryString += '&ProdTypeID=' + f.ProductTypeID.value;
}
window.location.href = queryString;
return (false);
}
return (false);
}
function getCheckedRadio(myRadio) {
for (var x = 0; x < myRadio.length; x++) {
if (myRadio[x].checked) {
return myRadio[x];
}
}
}
</script>
<input type="submit" onclick="loadNewSearch(this);return(false);" value="{aspdnsf:StringResource('searchadv.aspx.23', $LocaleSetting)}" name="SubmitSearch" id="SubmitSearch" />
</td>
</tr>
</table>
<xsl:if test="aspdnsf:AppConfigBool('Search_ShowCategoriesInResults')='true' and count(/root/Categories/Category)>0">
<br />
<table width="100%" cellpadding="2" cellspacing="0" style="border-style: solid; border-width: 0px; border-color: #444444">
<tr>
<td align="left" valign="top">
<img border="0" src="{concat('App_Themes/Skin_', aspdnsf:SkinID(), '/images/matchingcategories.gif')}"></img>
<br/>
<table width="100%" cellpadding="4" cellspacing="0" border="0" style="{aspdnsf:AppConfig('BoxFrameStyle')}">
<tr>
<td align="left" valign="top">
<xsl:apply-templates select="/root/Categories/Category" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="aspdnsf:AppConfigBool('Search_ShowSectionsInResults')='true' and count(/root/Sections/Section)>0">
<br />
<table width="100%" cellpadding="2" cellspacing="0" style="border-style: solid; border-width: 0px; border-color: #444444">
<tr>
<td align="left" valign="top">
<img border="0" src="{concat('App_Themes/Skin_', aspdnsf:SkinID(), '/images/matchingsections.gif')}"></img>
<br/>
<table width="100%" cellpadding="4" cellspacing="0" border="0" style="{aspdnsf:AppConfig('BoxFrameStyle')}">
<tr>
<td align="left" valign="top">
<xsl:apply-templates select="/root/Sections/Section" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="aspdnsf:AppConfigBool('Search_ShowManufacturersInResults')='true' and count(/root/Manufacturers/Manufacturer)>0">
<br />
<table width="100%" cellpadding="2" cellspacing="0" style="border-style: solid; border-width: 0px; border-color: #444444">
<tr>
<td align="left" valign="top">
<img border="0" src="{concat('App_Themes/Skin_', aspdnsf:SkinID(), '/images/matchingmanufacturers.gif')}"></img>
<br/>
<table width="100%" cellpadding="4" cellspacing="0" border="0" style="{aspdnsf:AppConfig('BoxFrameStyle')}">
<tr>
<td align="left" valign="top">
<xsl:apply-templates select="/root/Manufacturers/Manufacturer" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="aspdnsf:AppConfigBool('Search_ShowDistributorsInResults')='true' and count(/root/Distributors/Distributor)>0">
<br />
<table width="100%" cellpadding="2" cellspacing="0" style="border-style: solid; border-width: 0px; border-color: #444444">
<tr>
<td align="left" valign="top">
<img border="0" src="{concat('App_Themes/Skin_', aspdnsf:SkinID(), '/images/matchingdistributors.gif')}"></img>
<br/>
<table width="100%" cellpadding="4" cellspacing="0" border="0" style="{aspdnsf:AppConfig('BoxFrameStyle')}">
<tr>
<td align="left" valign="top">
<xsl:apply-templates select="/root/Distributors/Distributor" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="aspdnsf:AppConfigBool('Search_ShowProductsInResults')='true' and count(/root/Products/Product)>0">
<br />
<table width="100%" cellpadding="2" cellspacing="0" style="{concat('border-style: solid; border-width: 0px; border-color: #', aspdnsf:AppConfig('HeaderBGColor'))}">
<tr>
<td align="left" valign="top">
<img align="bottom" border="0" src="{concat('App_Themes/Skin_', aspdnsf:SkinID(), '/images/matchingproducts.gif')}"></img>
<br/>
<table width="100%" cellpadding="4" cellspacing="0" border="0" style="{aspdnsf:AppConfig('BoxFrameStyle')}">
<tr>
<td align="left" valign="top">
<table cellpadding="0" border="0" cellspacing="1" width="100%" id="productResults">
<thead>
<tr>
<th align="left">
<table width="100%">
<tr>
<td>
</td>
<td>
<!--<xsl:if test="$ShowPics = 1">
<xsl:attribute name="colspan">2</xsl:attribute>
</xsl:if>-->
<b>
<xsl:value-of select="aspdnsf:StringResource('search.aspx.6', $LocaleSetting)" disable-output-escaping="yes" />
</b>
</td>
</tr>
</table>
</th>
<th align="center">
<b>
<xsl:value-of select="aspdnsf:StringResource('search.aspx.7', $LocaleSetting)" disable-output-escaping="yes" />
</b>
</th>
<th align="center">
<b>
<xsl:value-of select="aspdnsf:StringResource('AppConfig.CategoryPromptSingular', $LocaleSetting)" disable-output-escaping="yes" />
</b>
</th>
<xsl:if test="aspdnsf:AppConfigBool('Search_ShowManufacturersInResults')='true'">
<th align="center">
<b>
<xsl:value-of select="aspdnsf:StringResource('search.aspx.8', $LocaleSetting)" disable-output-escaping="yes" />
</b>
</th>
</xsl:if>
<th>
<!--add to cart button-->
</th>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="/root/Products/Product" />
</tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:if>
<xsl:variable name="hasCategoryDisplay" select="aspdnsf:AppConfigBool('Search_ShowCategoriesInResults')='true' and count(/root/Categories/Category)>0" />
<xsl:variable name="hasSectionDisplay" select="aspdnsf:AppConfigBool('Search_ShowSectionsInResults')='true' and count(/root/Sections/Section)>0" />
<xsl:variable name="hasManufacturerDisplay" select="aspdnsf:AppConfigBool('Search_ShowManufacturersInResults')='true' and count(/root/Manufacturers/Manufacturer)>0" />
<xsl:variable name="hasProductDisplay" select="aspdnsf:AppConfigBool('Search_ShowProductsInResults')='true' and count(/root/Products/Product)>0" />
<xsl:if test="/root/Form/searchterm and $hasCategoryDisplay = false() and $hasSectionDisplay = false() and $hasManufacturerDisplay = false() and $hasProductDisplay = false()">
<p align="left">
<xsl:value-of select="aspdnsf:StringResource('search.aspx.9', $LocaleSetting)" disable-output-escaping="yes" />
<b></b>
</p>
</xsl:if>
<script type="text/javascript" Language="JavaScript">
function SearchForm2_Validator()
{
submitonce(theForm);
if (theForm.SearchTerm.value.length < <xsl:value-of select="aspdnsf:AppConfig('MinSearchStringLength')" />)
{
alert('<xsl:value-of select="aspdnsf:StrFormatStringresource('search.aspx.2', aspdnsf:AppConfig('MinSearchStringLength'), ',')" disable-output-escaping="yes" />');
theForm.SearchTerm.focus();
submitenabled(theForm);
return (false);
}
return (true);
}
theForm.SearchTerm.focus();
theForm.onsubmit = SearchForm2_Validator;
</script>
<xsl:value-of select="aspdnsf:Topic('SearchPageFooter')" disable-output-escaping="yes" />
</xsl:template>
<xsl:template match="Product">
<xsl:param name="pName">
<xsl:choose>
<xsl:when test="count(Name/ml/locale[@name=$LocaleSetting])!=0">
<xsl:value-of select="Name/ml/locale[@name=$LocaleSetting]"/>
</xsl:when>
<xsl:when test="count(Name/ml/locale[@name=$WebConfigLocaleSetting])!=0">
<xsl:value-of select="Name/ml/locale[@name=$WebConfigLocaleSetting]"/>
</xsl:when>
<xsl:when test="count(Name/ml)=0">
<xsl:value-of select="Name"/>
</xsl:when>
</xsl:choose>
</xsl:param>
<xsl:param name="vName">
<xsl:choose>
<xsl:when test="count(VariantName/ml/locale[@name=$LocaleSetting])!=0">
<xsl:value-of select="Name/ml/locale[@name=$LocaleSetting]"/>
</xsl:when>
<xsl:when test="count(VariantName/ml/locale[@name=$WebConfigLocaleSetting])!=0">
<xsl:value-of select="VariantName/ml/locale[@name=$WebConfigLocaleSetting]"/>
</xsl:when>
<xsl:when test="count(VariantName/ml)=0">
<xsl:value-of select="VariantName"/>
</xsl:when>
</xsl:choose>
</xsl:param>
<xsl:param name="vCalculatedPrice">
<xsl:value-of select="aspdnsf:GetVariantPriceDecimal(VariantID, Price, SalePrice, ExtendedPrice, Points, TaxClassID, 0, 0, 0)" disable-output-escaping="yes" />
</xsl:param>
<xsl:if test="$vCalculatedPrice>=$MinPrice and $vCalculatedPrice<=$MaxPrice">
<xsl:variable name="colSpan">
<xsl:choose>
<xsl:when test="$ShowPics = 1 and aspdnsf:AppConfigBool('Search_ShowManufacturersInResults')='true'">5</xsl:when>
<xsl:when test="$ShowPics = 1 or aspdnsf:AppConfigBool('Search_ShowManufacturersInResults')='true'">4</xsl:when>
<xsl:otherwise>3</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="productId" select="ProductID" />
<!--<xsl:if test="position()!=1">
<tr>
<td height="1" width="100%" class="LightCell" colspan="{$colSpan}">
<img src="images/spacer.gif" height="1" width="1" />
</td>
</tr>
</xsl:if>-->
<tr>
<td valign="middle" align="left" >
<table>
<tr>
<td>
<xsl:if test="$ShowPics = 1">
<a class="left" href="{aspdnsf:ProductLink(ProductID, SEName, 0, '')}">
<xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFileNameOverride, SKU, 'icon', 0)" disable-output-escaping="yes" />
</a> 
</xsl:if>
</td>
<td valign="middle">
<b>
<a href="{aspdnsf:ProductLink(ProductID, SEName, 0, '')}">
<xsl:value-of select="$pName" disable-output-escaping="yes"/>
<xsl:if test="vName!=''">-<xsl:value-of select="$vName" />
</xsl:if>
</a>
</b>
<br />
<br />
<!--<xsl:value-of select="Description" />-->
<xsl:value-of select='aspdnsf:GetMLValueWithRegex(Description,"<br /><br /><asp:literal.*?visible=.*?</asp:literal>","")' disable-output-escaping="yes" />
</td>
</tr>
</table>
</td>
<td align="center">
<a href="{aspdnsf:ProductLink(ProductID, SEName, 0, '')}">
<xsl:value-of select="SKU" />
<xsl:if test="SKUSuffix!=''">
<xsl:value-of select="SKUSuffix" />
</xsl:if>
</a>
<xsl:apply-templates select="$AvailablePromotions/Promotion[ProductId=$productId]" />
</td>
<td align="center">
<xsl:value-of select="aspdnsf:ProductEntityList(ProductID, 'category')" disable-output-escaping="yes" />
</td>
<xsl:if test="aspdnsf:AppConfigBool('Search_ShowManufacturersInResults')='true'">
<td align="center">
<xsl:if test="ManufacturerID!=''">
<xsl:value-of select="aspdnsf:ManufacturerLink(ManufacturerID, ManufacturerSEName, 1, ManufacturerName)" disable-output-escaping="yes" />
</xsl:if>
</td>
</xsl:if>
<td>
<xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 0, 'left')" disable-output-escaping="yes" />
</td>
</tr>
</xsl:if>
</xsl:template>
<xsl:template match="Category|Section|Manufacturer">
<xsl:param name="EntityName" select="name()" />
<xsl:param name="EntityIDName" select="concat($EntityName, 'ID')" />
<xsl:param name="EntityID" select="./*[name() = $EntityIDName]" />
<xsl:param name="Helper" select="/root/EntityHelpers/*[name() = $EntityName]" />
<xsl:for-each select="$Helper/descendant::Entity[EntityID=$EntityID]">
<tr>
<td align="left" valign="top">
<xsl:call-template name="entitybreadcrumb">
<xsl:with-param name="EntityName" select="$EntityName" />
</xsl:call-template>
</td>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template match="Distributor">
<xsl:param name="DistID" select="DistributorID" />
<xsl:for-each select="/root/EntityHelpers/Distributor/descendant::Entity[EntityID=$DistID]">
<tr>
<td align="left" valign="top">
<xsl:call-template name="entitybreadcrumb">
<xsl:with-param name="entityprefix" select="'d'" />
</xsl:call-template>
</td>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template name="entitybreadcrumb">
<xsl:param name="EntityName" />
<xsl:for-each select="ancestor-or-self::*[child::SEName and ancestor::EntityHelpers]">
<xsl:variable name="pEName">
<xsl:choose>
<xsl:when test="count(Name/ml/locale[@name=$LocaleSetting])!=0">
<xsl:value-of select="Name/ml/locale[@name=$LocaleSetting]"/>
</xsl:when>
<xsl:when test="count(Name/ml/locale[@name=$WebConfigLocaleSetting])!=0">
<xsl:value-of select="Name/ml/locale[@name=$WebConfigLocaleSetting]"/>
</xsl:when>
<xsl:when test="count(Name/ml)=0">
<xsl:value-of select="Name"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
<a href="{aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0)}">
<xsl:value-of select="$pEName"/>
</a> <xsl:if test="position()!=last()">-</xsl:if> 
</xsl:for-each>
</xsl:template>
<xsl:template match="ProductType">
<option value="{ProductTypeID}">
<xsl:if test="ProductTypeID=/root/Form/producttypeid">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="aspdnsf:GetMLValue(Name)" />
</option>
</xsl:template>
<xsl:template name="EntityOption">
<xsl:param name="prefix"></xsl:param>
<xsl:param name="selected"></xsl:param>
<xsl:param name="eName">
<xsl:choose>
<xsl:when test="count(Name/ml/locale[@name=$LocaleSetting])!=0">
<xsl:value-of select="Name/ml/locale[@name=$LocaleSetting]"/>
</xsl:when>
<xsl:when test="count(Name/ml/locale[@name=$WebConfigLocaleSetting])!=0">
<xsl:value-of select="Name/ml/locale[@name=$WebConfigLocaleSetting]"/>
</xsl:when>
<xsl:when test="count(Name/ml)=0">
<xsl:value-of select="Name"/>
</xsl:when>
</xsl:choose>
</xsl:param>
<option value="{EntityID}">
<xsl:if test="$selected=EntityID">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="concat($prefix, $eName)"/>
</option>
<xsl:for-each select="Entity">
<xsl:call-template name="EntityOption">
<xsl:with-param name="prefix" select="concat($prefix, $eName, ' -> ')" />
<xsl:with-param name="selected" select="$selected" />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template match="Promotion">
<span class="promotionCallToAction">
<xsl:value-of select="CallToAction" disable-output-escaping="yes" />
</span>
</xsl:template>
</xsl:stylesheet>
</PackageTransform>
</package>
Of course, this won't work as a drop-in because I have added many other mods to the advanced search page, but it should give you the complete picture of what needs to be done.