Announcement

Collapse
No announcement yet.

Removing duplicate products from the Search, but keeping them for Filtering

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Removing duplicate products from the Search, but keeping them for Filtering

    Open 'SearchScript.pl' in a plain text editor such as 'Notepad'.

    Search for:-

    sub DisplayResults


    then the line: -

    my @Results = sort

    Amend that line to:

    Code:
    my @TempResults = sort
    The after the line: -

    Code:
        keys %mapProdRefToSortOrders;                   # get product references then sort
    add the following code below it: -

    Code:
            my @Results;
            if ($::g_InputHash{FT} ne "GF")                 # not General Filter search?
                {
                @Results = map {(index($_, "!") eq -1) ? $_ : ()} @TempResults; # remove duplicate products from search results
                }
            else
                {
                @Results = @TempResults;                        # don't remove duplicate products from search results
                }
    Once you have done this save and close the file.

    Upload the site for the changes to take place.
Working...
X