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 7 of 7

Thread: Advanced Search in V9

  1. #1
    Bastian33o2 is offline Member
    Join Date
    May 2008
    Posts
    44

    Default Advanced Search in V9

    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

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Do you have the source? Go to ASPDNSFControls/Search.cs class, Search() method, and change the landing page to this.LandingPage = "searchadv.aspx".

  3. #3
    Bastian33o2 is offline Member
    Join Date
    May 2008
    Posts
    44

    Default

    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

  4. #4
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    You need to look in Search.cs within the AspDotNetStorefrontControls and make the change, and re-compile with that change.

  5. #5
    Bastian33o2 is offline Member
    Join Date
    May 2008
    Posts
    44

    Default

    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

  6. #6
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    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>

  7. #7
    Airstrike is offline Junior Member
    Join Date
    Mar 2006
    Location
    Cape Canaveral, FL
    Posts
    5

    Default

    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