From dc9b5989413a88559b14e4ec63ecb290fdaa7614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 26 Jan 2023 11:25:14 +0100 Subject: [PATCH] Adjust sorting of search result within concept 'events' --- .../ep_products/Classes/Service/SearchResultService.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php b/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php index 08acc013..4922aac1 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/SearchResultService.php @@ -193,9 +193,12 @@ class SearchResultService implements SingletonInterface } - // Sort products by minprice within concept sections - foreach ($data as $conceptUid => &$section) - { + // Sort products by minprice within concept sections except for 'event' concept + foreach ($data as &$section) { + if ('evt' === $section['concept']['code']) { + continue; + } + uasort($section['items'], function ($a, $b) { return strcmp($a['minPrice'], $b['minPrice']); });