Merge pull request #4411 from rahulshukla-webkul/development

added removed condtion for multiselect serach
This commit is contained in:
Jitendra Singh 2020-12-30 13:06:51 +05:30 committed by GitHub
commit dfe8374f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 8 deletions

View File

@ -235,14 +235,12 @@ class ProductRepository extends Repository
if ($attribute->type != 'price') {
$attributeQuery->where(function ($attributeValueQuery) use ($column, $filterInputValues) {
// foreach ($filterInputValues as $filterValue) {
// if (! is_numeric($filterValue)) {
// continue;
// }
// $attributeValueQuery->orWhereRaw("find_in_set(?, {$column})", [$filterValue]);
// }
$attributeValueQuery->whereIn($column, $filterInputValues);
foreach ($filterInputValues as $filterValue) {
if (! is_numeric($filterValue)) {
continue;
}
$attributeValueQuery->orWhereRaw("find_in_set(?, {$column})", [$filterValue]);
}
});
} else {