Pattern matching in search/filter

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
kartikbhat
Posts: 40
Joined: 02 Dec 2021, 17:18

Pattern matching in search/filter

Post by kartikbhat » 30 Aug 2022, 15:48

I need to change filter/search term "==" to "%LIKE%" kind of pattern matching while query;
Here I have comparison with "==" operator on themes field of products table

Code: Select all

$products = \Aimeos\Controller\Frontend::create( $context, 'product' )

				->sort( $sort ) // prioritize user sorting over the sorting through relevance and category

				->compare( '==', 'themes', $view->param( 'f_theme' ) )
I need to make this thing should work with %LIKE% kind of pattern (substring/subpart of value present at theme field of products table)

How can I modify above code to work it properly...

TIA :)

User avatar
aimeos
Administrator
Posts: 8636
Joined: 01 Jan 1970, 00:00

Re: Pattern matching in search/filter

Post by aimeos » 01 Sep 2022, 10:57

Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply