ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Allow integer/number search

May 11, 2010 11:48am

Subscribe [2]
  • #1 / May 11, 2010 11:48am

    Jordan Moore

    45 posts

    Hey guys,

    I have a requirement to meet as part of a project that the user must be able to search a product by title, description and product_number. I notice EE doesn’t allow search strings below 3 characters which is grand, and I also know you can tinker around with stopwords.php to help allow characters.

    Is there any way I can allow a search for numbers? The largest number won’t even hit 3 digits.

    Many thanks,
    Jordan

  • #2 / May 11, 2010 1:11pm

    Jordan Moore

    45 posts

    No worries chaps. I just brought down the character limit in the mod.search.php file (near the top) to 1 character.

    Then I made sure that in my simple search form that I include the parameter “where=‘word’” exists so that it doesn’t return items containing the number I’m looking for as well as the number itself - eg: a search for “1” returning “1, 11, 12, 13,...” etc.

    - Jordan

  • #3 / May 11, 2010 3:48pm

    Ingmar

    29245 posts

    So, you’re good?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases