Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 18 of 18

Thread: Display/Show Thumbnails in Search/Wish List

  1. #1
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default Display/Show Thumbnails in Search/Wish List

    Hello,

    Could someone please help me on getting thumbnails to show up on Search results and in the Wishlist?

    Thank you in advance,

    ~D

  2. #2
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    This is not that hard to do for the search results (which are you looking for, simple search or advanced search), but is non-trivial for the wish-list (do you own source code?).
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  3. #3
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by cjbarth View Post
    This is not that hard to do for the search results (which are you looking for, simple search or advanced search), but is non-trivial for the wish-list (do you own source code?).
    Thank you for your reply.

    I am looking for both simple/advanced, however, I could not find how to change to advance search. And yes, I do own the code.

    Thank you again,

    ~D

  4. #4
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    Well, for the Advanced Search page, you can just edit the xml.config file to set the show pics radio button defaulted to 1 and that will cause the pictures to always be shown by default.

    As for the wish list...let me find my code and I'll get back to you.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  5. #5
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by cjbarth View Post
    Well, for the Advanced Search page, you can just edit the xml.config file to set the show pics radio button defaulted to 1 and that will cause the pictures to always be shown by default.

    As for the wish list...let me find my code and I'll get back to you.
    Thank you very much, but I seem to be having trouble implementing the Advanced Search. When I follow the directions in the document it still does not work.

    Any luck on the Wish List code?

    Thanks again!

    ~D

  6. #6
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    What issues are you having with adding image to the Advanced Search page?

    Also, I modified the wish list to include price, not images, sorry. I made the modifications in ShoppingCartControl.vb.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  7. #7
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by cjbarth View Post
    What issues are you having with adding image to the Advanced Search page?

    Also, I modified the wish list to include price, not images, sorry. I made the modifications in ShoppingCartControl.vb.
    Where's the code? I don't mind having the pricing too...

    As far as the Advanced Search: I followed the instructions for adding it or changing it and it doesn't seem to work. I am using ML.

  8. #8
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    I modified the code to look like the following:

    Code:
    				If Me.DisplayMode = CartDisplayMode.WishList OrElse Me.DisplayMode = CartDisplayMode.GiftRegistry Then
    					Dim btnMoveToCart As New Button()
    
    					If Me.DisplayMode = CartDisplayMode.WishList Then
    						btnMoveToCart.Text = LineItemSetting.MoveFromWishListText
    					Else
    						btnMoveToCart.Text = LineItemSetting.MoveFromGiftRegistryText
    					End If
    
                        Controls.Add(lblSubTotal)
                        Controls.Add(New LiteralControl("<br />"))
    
                        btnMoveToCart.ID = "btnMoveToCart"
    					btnMoveToCart.CommandName = "MoveToShoppingCart"
    					btnMoveToCart.CommandArgument = cItem.ShoppingCartRecordID.ToString()
    					Controls.Add(btnMoveToCart)
    				Else
    					Controls.Add(lblSubTotal)
    				End If
    As for the Advanced Search, are you getting an error? Does the source code show that images should be there? Do image show when you manually select the 'show images' radio button?
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  9. #9
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by cjbarth View Post
    I modified the code to look like the following:

    Code:
    				If Me.DisplayMode = CartDisplayMode.WishList OrElse Me.DisplayMode = CartDisplayMode.GiftRegistry Then
    					Dim btnMoveToCart As New Button()
    
    					If Me.DisplayMode = CartDisplayMode.WishList Then
    						btnMoveToCart.Text = LineItemSetting.MoveFromWishListText
    					Else
    						btnMoveToCart.Text = LineItemSetting.MoveFromGiftRegistryText
    					End If
    
                        Controls.Add(lblSubTotal)
                        Controls.Add(New LiteralControl("<br />"))
    
                        btnMoveToCart.ID = "btnMoveToCart"
    					btnMoveToCart.CommandName = "MoveToShoppingCart"
    					btnMoveToCart.CommandArgument = cItem.ShoppingCartRecordID.ToString()
    					Controls.Add(btnMoveToCart)
    				Else
    					Controls.Add(lblSubTotal)
    				End If
    As for the Advanced Search, are you getting an error? Does the source code show that images should be there? Do image show when you manually select the 'show images' radio button?
    I am not receiving an error message. It works if I search FROM the searchadv.aspx page, but if I search from the search box in the header, it does NOT work.

  10. #10
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    That is because, by default, the search box is not linked to the advsearch page, but rather to the regular search page. The change I made to get the search box to link to the advanced search page is:

    Code:
                            <aspdnsf:Search ID="ctrlSearch" runat="server" CssClass="search" SearchCaption="<%$ Tokens: StringResource, common.cs.82 %>"
                              NavigateUrl="~/searchadv.aspx">Search...</asp:HyperLink>
    There are some changes you might have to make to the advsearch page to get this to all work properly, but this should get you started.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  11. #11
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by cjbarth View Post
    That is because, by default, the search box is not linked to the advsearch page, but rather to the regular search page. The change I made to get the search box to link to the advanced search page is:

    Code:
                            <aspdnsf:Search ID="ctrlSearch" runat="server" CssClass="search" SearchCaption="<%$ Tokens: StringResource, common.cs.82 %>"
                              NavigateUrl="~/searchadv.aspx">Search...</asp:HyperLink>
    There are some changes you might have to make to the advsearch page to get this to all work properly, but this should get you started.
    OK. I did this - which I think I have tried before - but I still get the same result. It goes to the Advanced Search page, but no images show the first time. The radio button is set to no by default, even though I have everything set to 1 in the XML package.

  12. #12
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    Do you have the following code set:

    Code:
    			<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>
    Code:
    							<!-- 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>
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  13. #13
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by cjbarth View Post
    Do you have the following code set:

    Code:
    			<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>
    Code:
    							<!-- 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>
    Where is this code?

    Code:
    <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>

  14. #14
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    It is all in the page.advsearch.xml.config file.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  15. #15
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Quote Originally Posted by cjbarth View Post
    It is all in the page.advsearch.xml.config file.

    Actually, I am not sure why, but, I don't have that code in there... Where does it go?

  16. #16
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    It should be just before the following code:

    Code:
    			<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>
    If you can't find it, then I suggest you add it. The entire page won't work correctly without it; so it probably is there somewhere. I suggest searching for ShowPics.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  17. #17
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    And this is all in page.searchadv.xml.config? I don't have that either. This is what I have:

    Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="Advanced Search Form" debug="false" includeentityhelper="true">
    
    	<!-- ###################################################################################################### -->
    	<!-- Copyright AspDotNetStorefront.com, 1995-2010.  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.                                                                   -->
    	<!--                                                                                                        -->
    	<!-- ###################################################################################################### -->
    
        <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="MinPrice">
                    <xsl:choose>
                    	<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="MaxPrice">
                    <xsl:choose>
                    	<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:template match="/">
                    <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)" />&#0160;&#0160;
                                </td>
                                <td align="left">
                                    <input type="text" name="SearchTerm" size="25" maxlength="70" value="{/root/Form/searchterm}"></input>
                                    <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)" />&#0160;&#0160;
                                </td>
                                <td align="left">
                                    <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.5', $LocaleSetting)"/>&#0160;<input TYPE="RADIO" NAME="SearchDescriptions" value="1" ><xsl:if test="/root/Form/searchdescriptions = 1"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input>
                                    <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.6', $LocaleSetting)"/>&#0160;<input TYPE="RADIO" NAME="SearchDescriptions" value="1" ><xsl:if test="/root/Form/searchdescriptions = 1 or not(boolean(/root/Form/searchdescriptions))"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input>
                                </td>
                            </tr>
    
                            <xsl:if test="aspdnsf:AppConfigBool('SearchAdv_ShowProductType')='false'">
                                <tr valign="middle">
                                    <td align="right" valign="middle">
                                        <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.7', $LocaleSetting)" />&#0160;&#0160;
                                    </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')='false'">
                                <tr valign="middle">
                                    <td align="right" valign="middle">
                                        <xsl:value-of select="aspdnsf:StringResource('AppConfig.CategoryPromptSingular', $LocaleSetting)" />:&#0160;&#0160;
                                    </td>
                                    <td align="left">
                                        <select onChange="theForm.submit()" style="font-size: 9px;" 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')='false'">
                                <tr valign="middle">
                                    <td align="right" valign="middle">
                                        <xsl:value-of select="aspdnsf:StringResource('AppConfig.SectionPromptSingular', $LocaleSetting)" />:&#0160;&#0160;
                                    </td>
                                    <td align="left">
                                        <select onChange="theForm.submit()" style="font-size: 9px;" 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')='false'">
                                <tr valign="middle">
                                    <td align="right" valign="middle">
                                        <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.18', $LocaleSetting)" disable-output-escaping="yes" />&#0160;&#0160;
                                    </td>
                                    <td align="left">
                                        <select onChange="theForm.submit()" style="font-size: 9px;" 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')='false'">
                                <tr valign="middle">
                                    <td align="right" valign="middle">
                                        <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.22', $LocaleSetting)" disable-output-escaping="yes" />&#0160;&#0160;
                                    </td>
                                    <td align="left">
                                        <select onChange="theForm.submit()" style="font-size: 9px;" 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" />&#0160;&#0160;
                                </td>
                                <td align="left">
                                    <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.5', $LocaleSetting)"/>&#0160;<input TYPE="RADIO" NAME="ShowPics" value="1" ><xsl:if test="/root/Form/showpics = 1"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input>
                                    <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.6', $LocaleSetting)"/>&#0160;<input TYPE="RADIO" NAME="ShowPics" value="1" ><xsl:if test="/root/Form/showpics = 1 or not(boolean(/root/Form/showpics))"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input>
                                </td>
                            </tr>
    
    
                            <xsl:if test="aspdnsf:AppConfigBool('SearchAdv_ShowPriceRange')='false'">
                                <tr valign="middle">
                                    <td width="25%" align="right" valign="middle">
                                        <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.12', $LocaleSetting)" />&#0160;&#0160;
                                    </td>
                                    <td align="left">
                                        <input maxLength="10" size="10" name="MinPrice" value="{/root/Form/minprice}"></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>
                                        &#0160;&#0160;&#0160;<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.14', $LocaleSetting)" />&#0160;&#0160;
                                        <input maxLength="10" size="10" name="MaxPrice" value="{/root/Form/maxprice}"></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/><input type="submit" 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')='false' 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')='false' 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')='false' 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%">
                                            <tr>
                                                <td align="left"><xsl:if test="/root/Form/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>
                                                <td align="center"><b><xsl:value-of select="aspdnsf:StringResource('search.aspx.7', $LocaleSetting)" disable-output-escaping="yes" /></b></td>
                                                <td align="center"><b><xsl:value-of select="aspdnsf:StringResource('AppConfig.CategoryPromptSingular', $LocaleSetting)" disable-output-escaping="yes" /></b></td>
    
                                                <xsl:if test="aspdnsf:AppConfigBool('Search_ShowManufacturersInResults')='true'">
                                                    <td align="center"><b><xsl:value-of select="aspdnsf:StringResource('search.aspx.8', $LocaleSetting)" disable-output-escaping="yes" /></b></td>
                                                </xsl:if>
                                            </tr>
    
                                            <xsl:apply-templates select="/root/Products/Product" />
    
                                        </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 &lt; <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:if test="Price&gt;=$MinPrice and Price&lt;=$MaxPrice">
                        <xsl:if test="position()!=1">
                            <tr><td height="1" width="100%" class=""><xsl:attribute name="colspan"><xsl:choose><xsl:when test="aspdnsf:AppConfigBool('Search_ShowManufacturersInResults')='true'">5</xsl:when><xsl:otherwise>4</xsl:otherwise></xsl:choose></xsl:attribute><img src="images/spacer.gif" height="1" width="1" /></td></tr>
                        </xsl:if>
                        <tr>
                            <xsl:if test="/root/Form/showpics = 1">
                                <td valign="middle" align="left">
                                <a href="{aspdnsf:ProductLink(ProductID, SEName, 0, '')}">
                                    <!--<xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFileNameOverride, SKU, 'icon', 0)" disable-output-escaping="yes" />-->
                                  <img src="http://s7d2.scene7.com/is/image/CompanyName/{SKU}_front?$ThumbNail$"></img>
                                </a>&#0160;
                                </td>
                            </xsl:if>
                            <td valign="middle" align="left" >
                                <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>
                            </td>
                            <td align="center"><xsl:value-of select="SKU" /><xsl:if test="SKUSuffix!=''"><xsl:value-of select="SKUSuffix" /></xsl:if></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>
                        </tr>
                    </xsl:if>
                </xsl:template>
    
    
    
    
                <xsl:template match="Category">
                    <xsl:param name="CatID" select="CategoryID" />
                    <xsl:for-each select="/root/EntityHelpers/Category/descendant::Entity[EntityID=$CatID]">
                        <tr>
                            <td align="left" valign="top">
                                <xsl:call-template name="entitybreadcrumb">
                                    <xsl:with-param name="entityprefix" select="'c'" />
                                </xsl:call-template>
                            </td>
                        </tr>
                    </xsl:for-each>
                </xsl:template>
    
                <xsl:template match="Section">
                    <xsl:param name="SecID" select="SectionID" />
                    <xsl:for-each select="/root/EntityHelpers/Section/descendant::Entity[EntityID=$SecID]">
                        <tr>
                            <td align="left" valign="top">
                                <xsl:call-template name="entitybreadcrumb">
                                    <xsl:with-param name="entityprefix" select="'s'" />
                                </xsl:call-template>
                            </td>
                        </tr>
                    </xsl:for-each>
                </xsl:template>
    
                <xsl:template match="Manufacturer">
                    <xsl:param name="ManID" select="ManufacturerID" />
                    <xsl:for-each select="/root/EntityHelpers/Manufacturer/descendant::Entity[EntityID=$ManID]">
                        <tr>
                            <td align="left" valign="top">
                                <xsl:call-template name="entitybreadcrumb">
                                    <xsl:with-param name="entityprefix" select="'m'" />
                                </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="entityprefix" />
                    <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="{concat($entityprefix, '-', EntityID, '-', SEName, '.aspx')}">
                            <xsl:value-of select="$pEName"/>
                        </a>&#0160;<xsl:if test="position()!=last()">-</xsl:if>&#0160;
                    </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, ' -&gt; ')" />
                            <xsl:with-param name="selected" select="$selected" />
                        </xsl:call-template>
                    </xsl:for-each>
                    
                </xsl:template>
    
            </xsl:stylesheet>
    
    
    
        </PackageTransform>
    </package>

  18. #18
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    That is probably because of the rather major modifications that I had to make to get the button to fire correctly against the advanced search page, which yours probably isn't doing quite right just yet.

    Have a look at this:

    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)" />&#0160;&#0160;
    														</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)" />&#0160;&#0160;
    														</td>
    								<td align="left">
    																<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.5', $LocaleSetting)"/>&#0160;<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)"/>&#0160;<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)" />&#0160;&#0160;
    																</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)" />:&#0160;&#0160;
    																</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)" />:&#0160;&#0160;
    																</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" />&#0160;&#0160;
    																</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" />&#0160;&#0160;
    																</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" />&#0160;&#0160;
    														</td>
    								<td align="left">
    																<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.5', $LocaleSetting)"/>&#0160;<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)"/>&#0160;<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)" />&#0160;&#0160;
    																</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>
    																		&#0160;&#0160;&#0160;<xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.14', $LocaleSetting)" />&#0160;&#0160;
    																		<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 += '&amp;SearchDescriptions=' + getCheckedRadio(f.SearchDescriptions).value;
    																		}
    
    																		if (getCheckedRadio(f.ShowPics).value != '1') {
    																				queryString += '&amp;ShowPics=' + getCheckedRadio(f.ShowPics).value;
    																		}
    
    																		if (f.MaxPrice.value != '') {
    																				queryString += '&amp;MaxPrice=' + f.MaxPrice.value;
    																		}
    
    																		if (f.MinPrice.value != '') {
    																				queryString += '&amp;MinPrice=' + f.MinPrice.value;
    																		}
    
    																		if (f.CategoryID.value != '0') {
    																				queryString += '&amp;CatID=' + f.CategoryID.value;
    																		}
    
    																		if (f.SectionID.value != '0') {
    																				queryString += '&amp;SecID=' + f.SectionID.value;
    																		}
    
    																		if (f.ManufacturerID.value != '0') {
    																				queryString += '&amp;ManID=' + f.ManufacturerID.value;
    																		}
    
    																		if (f.DistributorID.value != '0') {
    																				queryString += '&amp;DistID=' + f.DistributorID.value;
    																		}
    
    																		if (f.ProductTypeID.value != '0') {
    																				queryString += '&amp;ProdTypeID=' + f.ProductTypeID.value;
    																		}
    
    																		window.location.href = queryString;
    
    																		return (false);
    
    																}
    
    																return (false);
    														}
    
    														function getCheckedRadio(myRadio) {
    																for (var x = 0; x &lt; 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 &lt; <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&gt;=$MinPrice and $vCalculatedPrice&lt;=$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>&#0160;
    						</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,"&lt;br /&gt;&lt;br /&gt;&lt;asp:literal.*?visible=.*?&lt;/asp:literal&gt;","")' 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>&#0160;<xsl:if test="position()!=last()">-</xsl:if>&#0160;
    						</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, ' -&gt; ')" />
    						<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.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM