Search filter issue
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!
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Search filter issue
Hello,
How can I get list of products with attribute id = 20 and price id = 67 (multiple search filter)? I tried this, but it returns "Invalid name "index.price.value"", why?
How can I get list of products with attribute id = 20 and price id = 67 (multiple search filter)? I tried this, but it returns "Invalid name "index.price.value"", why?
Code: Select all
$productManager = \Aimeos\MShop::create( app('aimeos.context')->get(), 'index' ) ;
$search = $productManager->filter( true )->slice( 0, 10000 );
$search->setConditions( $search->compare( '==', 'index.attribute.id', '20' ) );
$search->setConditions( $search->compare( '==', 'index.price.value', '67' ) );
Re: Search filter issue
The correct search name for product prices in the index is "index.price:value":
https://github.com/aimeos/aimeos-core/b ... hp#L35-L42
https://github.com/aimeos/aimeos-core/b ... hp#L35-L42
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: Search filter issue
thanks, it works.