Adding a column from products table to searchable index so that all products with specific column value can be searched
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!
Re: Adding a column from products table to searchable index so that all products with specific column value can be searc
If you create a decorator for the product manager, you can also search for new properties:
https://aimeos.org/docs/latest/models/e ... /#easy-way
https://aimeos.org/docs/latest/models/e ... /#easy-way
Code: Select all
$manager = \Aimeos\MShop::create( $context, 'product' );
$filter = $manager->filter()->add( 'tags', '==', 'Best Seller' );
$items = $manager->search( $filter );
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
Re: Adding a column from products table to searchable index so that all products with specific column value can be searc
In that case, use the frontend product controller from your screenshot and add this for filtering by tags:
See: https://github.com/aimeos/ai-controller ... ce.php#L62
Code: Select all
->compare( '==', 'tags', 'Best seller' )
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
Re: Adding a column from products table to searchable index so that all products with specific column value can be searc
Place your condition between the create() and search() methods in an if() condition:
Code: Select all
$cntl = \Aimeos\Controller\Frontend::create( $context, 'product' );
if( $theme = $view->param( 'f_theme' ) ) {
$cnt->compare( '==', 'themes', $theme );
}
$products = $cntl->...()->search();
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