Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2011
    Posts
    69
    Plugin Contributions
    0

    Default In-site search 2-digit/char

    http://www.glimm_erdog.com

    I am selling a lot of products where people may type into the in-site search with 2-digit codes such as "72" or "hp 72". This never comes out well. With 3-digit codes it works pretty well.

    Any ideas as a way to modify the search parameters? I'm guessing a lot of results would come up, but if it pulled from the "Model" or "Name" first that would be helpful.

    Thanks!

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: In-site search 2-digit/char

    Quote Originally Posted by zcadqliv View Post
    http://www.glimm_erdog.com

    I am selling a lot of products where people may type into the in-site search with 2-digit codes such as "72" or "hp 72". This never comes out well. With 3-digit codes it works pretty well.
    To the best of my knowledge zencart doesn't place any limit (upper or lower) on the permissible length of search strings, so whatever the difference is between the 2 and 3 character strings, it is more likely to be a coincidence rather than a connection.

    Quote Originally Posted by zcadqliv View Post
    Any ideas as a way to modify the search parameters?
    A skilled coder could make many modifications. What is your skill level, and exactly what is it you wish to modify?

    Quote Originally Posted by zcadqliv View Post
    I'm guessing a lot of results would come up,
    Computers don't guess. When trying to solve problems it is always best to assume the computer is correct and your guesses are incorrect. You can save a lot of headscratching that way. :)

    Quote Originally Posted by zcadqliv View Post
    but if it pulled from the "Model" or "Name" first that would be helpful.
    Thanks!
    I'll need to look at the code to be sure, but seriously doubt that there will be a 'check this first, check that second' type code in place. It will be a matter of checking all (specified) fields without any preference.. in other words, things will match, or they won't match.

    Someone more familiar with the code may be able to tell you exactly which fields are being searched (or better yet, if you can identify the relevant code yourself it will probably become 'obvious' and you'll probably also be able to cut n paste code to add additional search fields (if necessary/required).

    The most difficult part is in trying to find the correct file that holds the search code.

    Cheers
    Rod

  3. #3
    Join Date
    Jan 2011
    Posts
    69
    Plugin Contributions
    0

    Default Re: In-site search 2-digit/char

    Thanks for the info RodG!

    I need to have it so that if someone types "hp 45" - with the space - that the product which is hp 45 shows up. Preferably first.

    Ideally, just "45" would bring it onto the first group of results, but I would live with the first part.

    That is all I care about. If you type it in a search engine the right thing comes up. My skill is medium, but I don't want to try and rewrite lots of code.

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: In-site search 2-digit/char

    Quote Originally Posted by zcadqliv View Post
    If you type it in a search engine the right thing comes up.
    Search queries tend to be application Dependant, meaning they don't all work the same way, so trying to compare how a search engine search works with how ZenCarts search routines work is a bit like comparing apples and oranges.

    Quote Originally Posted by zcadqliv View Post
    My skill is medium, but I don't want to try and rewrite lots of code.
    You shouldn't need to, even though I still can't explain why your 3 character searches work but the 2 character ones don't (within zen cart).

    As I said b4, unless someone familiar with this aspect of zencart code speaks up, the only way to figure out whats going on would be to inspect the code.

    Although probably unlikely, it could be that your 2 character search queries are failing not because they are only 2 characters, but perhaps because they both happen to be numbers rather than letters and zencart isn't seeing this as a text string....... I really don't think this would be the case in code as mature as Zencart, but this kind of thing isn't uncommon in less mature code.

    Sorry, but I really can't be of any more help than this at this point in time.

    Cheers
    Rod

 

 

Similar Threads

  1. International USPS 5 digit shipping error.
    By EZorb in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 16 Mar 2011, 03:17 PM
  2. Replies: 1
    Last Post: 25 Jan 2011, 02:05 PM
  3. 3 digit country ISO codes
    By damiantaylor in forum General Questions
    Replies: 3
    Last Post: 14 Aug 2010, 10:25 AM
  4. Replies: 2
    Last Post: 2 Feb 2010, 11:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR