Product filter
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Product filter
Why is this filter not working?
And this one works
And this one works
How to query for two properties?
Code: Select all
$productFilter->add($productFilter->and([
$productFilter->is($productFilter->make('product:prop', ['vendor_code', null, $productData[0]] ), '!=', null),
$productFilter->is($productFilter->make('product:prop', ['barcode', null, $productData[8]] ), '!=', null),
]))->add( 'product.type', '==', 'default');
Code: Select all
$productManager->search($productFilter->add('product.type', '==', 'default')
->add($productFilter->make( 'product:prop', ['vendor_code', null, $productData[0]]), '!=', null)
->add($productFilter->make( 'product:prop', ['barcode', null, $productData[8]]), '!=', null));
Code: Select all
$productFilter->add($productFilter->and([
$productFilter->is($productFilter->make('product:prop', ['vendor_code', null, $productData[0]] ), '!=', null),
]))->add( 'product.type', '==', 'default');
Code: Select all
$productFilter->add($productFilter->and([
$productFilter->is($productFilter->make('product:prop', ['barcode', null, $productData[8]] ), '!=', null),
]))->add( 'product.type', '==', 'default');
How to query for two properties?
Re: Product filter
That doesn't work because relational databases join tables and records this way:
Thus, there will be no joined record with contains both property types/values.
Code: Select all
id, code, label, propertyid, propertytype, propertyvalue
1, 'prod', 'Test', 10, 'vendor_code', 'abcd'
1, 'prod', 'Test', 11, 'barcode', '1234'
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: Product filter
I have two questions:
There is a product attribute called Author with many names.
The promblem is, filter dropdown does not include all names.
And other.
Can I list the suppliers by number DESC?
Thank You!
There is a product attribute called Author with many names.
The promblem is, filter dropdown does not include all names.
And other.
Can I list the suppliers by number DESC?
Thank You!
Re: Product filter
There's an internal (configurable) limit how many items are fetched in one request to mitigate DoS attacks. You can increase the limit using this setting: https://aimeos.org/docs/2022.x/config/c ... /#max-size
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