override customer/standard.php and change in search function

Help for integrating the Laravel package
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!
raghibkhesal2001

override customer/standard.php and change in search function

Post by raghibkhesal2001 » 26 Aug 2020, 11:59

override customer/standard.php and change in search function.

after override, i added one condition

Code: Select all

if(!$user->superuser){
	$search->setConditions( $search->compare( '==', 'customer.siteid', $user->siteid ) );
}
Showing error: ErrorInvalid name "customer.siteid", /var/www/html/aimeos/myshop/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Criteria/Expression/Compare/Base.php:104


I also tried because all admin user added on the user table

Code: Select all

if(!$user->superuser){
	$search->setConditions( $search->compare( '==', 'user.siteid', $user->siteid ) );
}
Showing error: ErrorInvalid name "user.siteid", /var/www/html/aimeos/myshop/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/Criteria/Expression/Compare/Base.php:104



Infact when i am trying following, its working:

Code: Select all

if(!$user->superuser){
	$search->setConditions( $search->compare( '==', 'customer.status', 1 ) );
}
Or

Code: Select all

if(!$user->superuser){
	$search->setConditions( $search->compare( '==', 'customer.salutation', 'my' ) );
}


Can anyone help me about this?

raghibkhesal2001

Re: override customer/standard.php and change in search function

Post by raghibkhesal2001 » 26 Aug 2020, 14:34

I have fixed this issue, just check the usertype and add my conditions.

Post Reply