Announcement

Collapse
No announcement yet.

Is it possible to prevent specific products from appearing in the search results?

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

    Is it possible to prevent specific products from appearing in the search results?

    This is a change to the SearchScript.pl Perl script which will mean that any products that end in 'x' will not be shown in the search results. Note that the search results sequence numbers will show a missing result.

    Open SearchScript.pl within a text editor such as Notepad and locate the following line:

    for ($nCount = $nMin; $nCount < $nMax; $nCount++) # process the range of product references in the results set

    Immediately after this line add the 2 lines:

    { # patch
    if ( $$rarrResults[$nCount] !~ /x$/ ) # hide products that have reference ending in x

    Then a little way below this, look for the pair of lines

    $sHTML .= ACTINIC::ParseXML($sResultMarkup); # parse the XML
    }

    Immediately after this pair of lines add the single line

    } # patch

    Then save the file and upload to test it. SellerDeck is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.

    With grateful thanks to Norman Rouxel for this solution.
Working...
X