Announcement

Collapse
No announcement yet.

How can I match plurals in the search?

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

    How can I match plurals in the search?

    Sometimes if you have the word 'apples' in your product description, you want people to be able to find that product if they search for the word 'apple' (without the 's'). This little addition to the Perl script will take care of that.

    Open 'Search.pm' (from within your site directory) in Notepad or a similar editor.

    Find the line:

    # Combine any multiple-white-spaces into single space

    Place the following lines just above that line:

    $$psSearchString =~ s/es$//io;
    $$psSearchString =~ s/s$//io;
    $$psSearchString =~ s/es\b//io;
    $$psSearchString =~ s/s\b//io;

    Disclaimer: This solution was provided by a customer on the SellerDeck Community http://community.sellerdeck.com, and 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.
Working...
X