Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Part description search
03-20-2020, 02:44 PM (This post was last modified: 03-20-2020 03:31 PM by alanmi3833.)
Post: #1
Part description search
Good day
When I search for a string in the part partial description, nothing gets returned. Are my search parameters wrong?
Eg. When I search for
1N5374
in partial description, which contains
ZENER 5W 75V 1N5374
I get
Quote:INFORMATION Message : No stock items were returned by this search please re-enter alternative criteria to try again

Just realized it searches in part description short not long.

Are there a way to search in long part description, as there are so much more information there. Most of the time in short are only an excerpt from the long.
Find all posts by this user
Quote this message in a reply
03-20-2020, 05:44 PM
Post: #2
RE: Part description search
This is quite easy to do in individual scripts, though parts are searched for in many scripts, so changing them all would take some time.
For instance in SelectProduct.php change line 607 from
AND stockmaster.description " . LIKE . " '$SearchString'
to
AND stockmaster.longdescription " . LIKE . " '$SearchString'

and line 627 from
WHERE description " . LIKE . " '$SearchString'
to
WHERE longdescription " . LIKE . " '$SearchString'

You can change any other scripts you like in a similar fashion. The question is, whether this should be policy, and we change all scripts, or should we leave it as is?

Thanks
Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2020, 10:55 PM (This post was last modified: 03-20-2020 11:35 PM by TurboPT.)
Post: #3
RE: Part description search
I'll take a look at the various part search areas too, curious if we might be able to streamline those areas to have common handling.

A couple of ideas that come to mind:
1. Could we also OR the two fields within the search maybe?
2. An option (such as a checkbox) with part searches to include long descriptions?

I'm open to other ideas as well.
Find all posts by this user
Quote this message in a reply
03-21-2020, 02:42 AM
Post: #4
RE: Part description search
Hi Paul, personally I prefer the first option.

Maybe this is the time to revisit the idea of having the item search code taken out into a separate include script so that we can have the same search code used throughout weberp? This would allow us to be more sophisticated in our search technique, using Soundex for example. Needs careful thought on the design of this script though.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
03-21-2020, 10:12 AM (This post was last modified: 03-21-2020 10:14 AM by TurboPT.)
Post: #5
RE: Part description search
Tim,

Yes, that is exactly my idea too with the '...streamline those areas to have common handling', so I feel we are on the same page! Smile (though likely not expressed in the same way)
Find all posts by this user
Quote this message in a reply
03-23-2020, 02:31 PM
Post: #6
RE: Part description search
Thank you so much Tim.

Changed to:
Code:
AND (stockmaster.longdescription " . LIKE . " '$SearchString'
   OR stockmaster.description " . LIKE . " '$SearchString')
and works like a charm

Regards
Alan
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)