Unable to query customers filtering for status
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!
Unable to query customers filtering for status
When querying for "active" customers, I'm unable to use a filter for status. I'm able to filter in other ways without an issue.
Thanks!
If I comment out the "status", the query works fine. Here is some of the stack trace from the logs:
Thanks!
Code: Select all
$userManager = MShop::create( $this->context(), 'customer' );
$search = $userManager->filter(true);
$search->slice(0, 10000);
$search->add('status', '==', '1');
$userList = $userManager->search($search);
Code: Select all
Invalid name "status"
#0 /Users/mymac/development/cybn-site/vendor/aimeos/aimeos-base/src/Criteria/Expression/Combine/SQL.php(71): Aimeos\Base\Criteria\Expression\Compare\Base->toSource(Array, Array, Array, Array)
#1 /Users/mymac/development/cybn-site/vendor/aimeos/aimeos-base/src/Criteria/Expression/Combine/SQL.php(79): Aimeos\Base\Criteria\Expression\Combine\SQL->toSource(Array, Array, Array, Array)
#2 /Users/mymac/development/cybn-site/vendor/aimeos/aimeos-base/src/Criteria/SQL.php(128): Aimeos\Base\Criteria\Expression\Combine\SQL->toSource(Array, Array, Array, Array)
#3 /Users/mymac/development/cybn-site/vendor/aimeos/aimeos-core/src/MShop/Common/Manager/DB.php(730): Aimeos\Base\Criteria\SQL->getConditionSource(Array, Array, Array, Array)
#4 /Users/mymac/development/cybn-site/vendor/aimeos/aimeos-core/src/MShop/Common/Manager/DB.php(817): Aimeos\MShop\Common\Manager\Base->getSQLReplacements(Object(Aimeos\Base\Criteria\PgSQL), Array, Array, Array, Array)
#5 /Users/mymac/development/cybn-site/vendor/aimeos/ai-laravel/src/MShop/Customer/Manager/Laravel.php(602): Aimeos\MShop\Common\Manager\Base->searchItemsBase(Object(Aimeos\Base\DB\Connection\DBAL), Object(Aimeos\Base\Criteria\PgSQL), 'mshop/customer/...', 'mshop/customer/...', Array, NULL, 3)
#6 /Users/mymac/development/cybn-site/vendor/aimeos/aimeos-core/src/MShop/Common/Manager/Decorator/Depth.php(59): Aimeos\MShop\Customer\Manager\Laravel->search(Object(Aimeos\Base\Criteria\PgSQL), Array, NULL)
#7 /Users/mymac/development/cybn-site/vendor/aimeos/aimeos-core/src/MShop/Common/Manager/Decorator/Lazy.php(38): Aimeos\MShop\Common\Manager\Decorator\Depth->search(Object(Aimeos\Base\Criteria\PgSQL), Array, NULL)
#8 /Users/mymac/development/cybn-site/vendor/aimeos/map/src/Map.php(5434): Aimeos\MShop\Common\Manager\Decorator\Lazy->Aimeos\MShop\Common\Manager\Decorator\closure()
#9 /Users/mymac/development/cybn-site/vendor/aimeos/map/src/Map.php(5497): Aimeos\Map->array(Object(Closure))
#10 /Users/mymac/development/cybn-site/vendor/aimeos/map/src/Map.php(806): Aimeos\Map->list()
#11 /Users/mymac/development/cybn-site/packages/cybn-management/templates/admin/jqadm/team/item-teamroles.php(20): Aimeos\Map->col('username', 'id')
Re: Unable to query customers filtering for status
Please disregard... I forgot to make it 'customer.status' instead of 'status'. Its what I get for looking at the DB and not the MShop files.
Re: Unable to query customers filtering for status
"filter(true)" adds the customer.status query automatically
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
![Image](https://aimeos.org/fileadmin/aimeos.org/icons/star.png)