Pattern matching in search/filter
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 40
- Joined: 02 Dec 2021, 17:18
Pattern matching in search/filter
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
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
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' ) )
How can I modify above code to work it properly...
TIA

Re: Pattern matching in search/filter
Use the "~=" operator: https://aimeos.org/docs/latest/models/s ... r/#compare
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
