How To Use the Search class

Open to all! Ask other shopowners for help.
Post Reply
levelup
Member
Posts: 15
Joined: Tue Mar 30, 2021 6:16 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 1 time

How To Use the Search class

Post 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.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: How To Use the Search class

Post by ecartz »

https://github.com/CE-PhoenixCart/Phoen ... dbb882ce63

Code: Select all

$search_keywords = Search::build($keywords)
$keywords passed in => out come $search_keywords
levelup
Member
Posts: 15
Joined: Tue Mar 30, 2021 6:16 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 1 time

Re: How To Use the Search class

Post 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!


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply