Skip to content

Commit 305c542

Browse files
[Admin] Backend view - duplicate search result on filtered list (#284)
* Fix Customer Duplicate Search Results * Added groupBy in buildListing method Co-authored-by: robertStk7 <[email protected]>
1 parent daaa341 commit 305c542

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Controller/Admin/CustomersController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,13 @@ protected function buildListing(array $filters = [], array $orders = [])
408408
{
409409
/** @var Listing|Listing\Concrete $listing */
410410
$listing = $this->getSearchHelper()->getCustomerProvider()->getList();
411+
412+
if (array_key_exists('operator-segments', $filters)) {
413+
if ($filters['operator-segments'] == 'ANY') {
414+
$listing->setGroupBy('o_id', true);
415+
}
416+
}
417+
411418
if (count($orders) > 0) {
412419
$listing
413420
->setOrderKey(array_keys($orders), false)

0 commit comments

Comments
 (0)