How to force the cart to use the advanced search (searchadv.aspx) instead of the default regular search (search.aspx)?
Also, how to force the product picture display in the search results?
Thanks,
How to force the cart to use the advanced search (searchadv.aspx) instead of the default regular search (search.aspx)?
Also, how to force the product picture display in the search results?
Thanks,
MultiStore 9.3.1.1
Do you have the source? Go to ASPDNSFControls/Search.cs class, Search() method, and change the landing page to this.LandingPage = "searchadv.aspx".
Alfred,
I'm using version 9.0.1.2 and there is no such line as "this.LandingPage =" in the search.aspx.cs. There is only one search.aspx.cs file in the main folder.
MultiStore 9.3.1.1
You need to look in Search.cs within the AspDotNetStorefrontControls and make the change, and re-compile with that change.
Chris Martz
United Art & Education
Thanks. I have that done. Now, how to force product picture display in default search? Right now when searching from the home page I get the search results (without product pictures) and the advanced search options.
MultiStore 9.3.1.1
Are you talking about the search functionality in the front-end's home page now? If you want to force "showpic" on the search results, checkout page.searchadv.xml.config, find <input TYPE="RADIO" NAME="ShowPics" value="0" >, and change the value to 1. If you want to do the same in page.search.xml.config, add these lines somewhere in that file.
Code:<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" /> </a> </td>
I have been trying to get this to work on the form in the template and I finally figured out to pass the parameters inside the form on the home page by adding this
<input TYPE="hidden" NAME="SearchDescriptions" value="1" ><input TYPE="hidden" NAME="ShowPics" value="1">
to this
<form name="topsearchform" method="get" action="searchadv.aspx">
<fieldset>
<label>Search:</label>
<input type="text" size="15" name="SearchTerm" class="searchBox" id="searchBox" autocomplete="off"
onfocus="javascript:this.style.background='#ffffff ';" onblur="javascript:this.style.background='#dddddd' ;" <input TYPE="hidden" NAME="SearchDescriptions" value="1" ><input TYPE="hidden" NAME="ShowPics" value="1"> />
<input type="button" onclick="document.topsearchform.submit()" title="Click Go to Submit" id="Go" class="submit" value="Go" />
</fieldset>
</form>
Now it automatically adds that the users search without having them enter that in, and getting the same results.
Hope that helps someone, I spent over an hour to figure that out.
And if you add hidden keywords to product descriptions, this makes the search very powerful without setting up full text search.
Below is an excerpt from http://blogs.aspdotnetstorefront.com...uct-pages.aspx
Here's an easy trick that lets you add hidden keywords to product descriptions that the advanced search will pick up. In the RAD editor used to set the product description, switch to HTML view and enter something like this:
<asp:literal text="keyword1, keyword2" visible="false" runat="server" id="keywordholder"></asp:literal>
This will place a hidden field on the page that customers can't see, but that the search can. Whatever you enter in the 'text' attribute will work as keywords, making your products easier to find on your site!
Are you a Good Person? click here to find out:
http://www.airstrikeinc.com/Flash/AreYouGood.swf