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

Thread: Search Results

  1. #1
    jspatt2 is offline Junior Member
    Join Date
    Sep 2008
    Posts
    27

    Default Search Results

    I have search the forum and see several posts about the search results page returning all of the variants and I do not want that, but I do not see a post the tells how to do this, if it is there I appologize. Can someone tell me how to do this?

    Thank you,

    Joel Patterson

  2. #2
    Jesse is offline Banned
    Join Date
    May 2008
    Posts
    1,329

    Default

    I don't really understand your question. Are you looking for a way to have the search box just return all variants? Are you looking for a way to have the search box filter it's results to variants only? Please elaborate on exactly what you're looking to accomplish.

  3. #3
    jspatt2 is offline Junior Member
    Join Date
    Sep 2008
    Posts
    27

    Default Search Results

    Right now it returns all variants and I only want one to come back.

    Thank you,

    Joel Patterson

  4. #4
    jspatt2 is offline Junior Member
    Join Date
    Sep 2008
    Posts
    27

    Default Search Results

    I only want 1 to come back instead of all of the variants.

    Thank you,

    Joel Patterson

  5. #5
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    Open up the page.search.xml.config or the page.searchadv.xml.config xmlpackage (depending on whether you are using the basic or the advanced search) and change the @ViewType parameter in the stored procedure in the Products query from 0 to 1
    Code:
    <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 = 1,
                    @pagenum = 1,
                    @pagesize = 2147483647,
                    @StatsFirst = 0,
    		@searchstr = @SearchTerm,
                    @extSearch = @SearchDescriptions,
                    @publishedonly = 1,
                    @ExcludePacks = 0,
                    @ExcludeKits = 0,
                    @ExcludeSysProds = 1
            ]]>
        </sql>
    This will keep the stored procedure from returning all variants, and only return the default variant. Switching this back to a value of 0 will cause the search to return all variants again.
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  6. #6
    jspatt2 is offline Junior Member
    Join Date
    Sep 2008
    Posts
    27

    Default Search Results

    Thank you that worked wonderfull.

    Joel Patterson