Announcement

Collapse
No announcement yet.

How can I omit certain products from search results?

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

    How can I omit certain products from 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.

    With grateful thanks to Norman Rouxel for this solution.

    Disclaimer: This code was provided by an SellerDeck user via the SellerDeck Community (http://community.sellerdeck.com/) and so can't be supported by the SellerDeck Technical Support team. 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.

    #2
    For SellerDeck 2013 the patch is slightly different:

    Open SearchScript.pl within a text editor such as Notepad and locate the following line:
    Code:
    	for ($nCount = $nMin; $nCount < $nMax; $nCount++) # process the range of product references in the results set
    Immediately after this line add the 2 lines:
    Code:
    	{	# patch
    	if ( $$rarrResults[$nCount] !~ /x$/ ) # hide products that have reference ending in x
    Then a some way below this (about 150 lines), look for the pair of lines
    Code:
    	#
    	# ensure 'End of Row' attribute is added correctly
    Immediately above this pair of lines insert the single line
    Code:
    	}	# patch
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment

    Working...
    X