Help with Filtering Products Using product.config

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
Jairus34
Posts: 31
Joined: 05 Aug 2024, 07:34

Help with Filtering Products Using product.config

Post by Jairus34 » 18 Oct 2024, 07:07

Hi community. I'm trying to filter products based on product.config, but I'm running into some issues. Here’s my current code:

Code: Select all

$productManager = \Aimeos\MShop::create( $this->context(), 'product' );
$filter = $productManager->filter();
$filter->add( 'product.config', '==',  ); //What to put here?
$items = $productManager->search( $filter );

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

Re: Help with Filtering Products Using product.config

Post by aimeos » 21 Oct 2024, 08:43

The product "config" property is just a key/value store which you can't use for filtering. If you nee filtering for your data, use product properties instead:
https://aimeos.org/docs/latest/manual/p ... cteristics
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply