Page 1 of 1

How To Use the Search class

Posted: Wed Feb 12, 2025 7:04 pm
by levelup
I'm trying to wrap my head around the Search class so thank you in advance for any pointers you may send my way.

I'm updating an old add-on that uses the deprecated parse string function: tep_parse_search_string($search_str = '', &$objects)

Of course, that has since been replaced by the Search class but I don't see many examples of this class being used.

Would anyone have an idea how to insert the "objects" parameter in the new Search class....or if I even need to? Within the old add-on, I'm updating, both the search_str and objects parameters have a variable in place.

Re: How To Use the Search class

Posted: Thu Feb 13, 2025 5:13 am
by ecartz
https://github.com/CE-PhoenixCart/Phoen ... dbb882ce63

Code: Select all

$search_keywords = Search::build($keywords)
$keywords passed in => out come $search_keywords

Re: How To Use the Search class

Posted: Wed Feb 19, 2025 5:20 pm
by levelup
ecartz wrote: Thu Feb 13, 2025 5:13 am https://github.com/CE-PhoenixCart/Phoen ... dbb882ce63

Code: Select all

$search_keywords = Search::build($keywords)
$keywords passed in => out come $search_keywords
Yes, I saw this! I appreciate your confirmation that I was on the right track.

Take care and thank you!