From 01d348e69af1915e4b88f91be40da8270015da91 Mon Sep 17 00:00:00 2001 From: Martin Grossmann Date: Mon, 4 Nov 2024 13:13:49 +0100 Subject: [PATCH] fixed parameter group sorting --- src/Model/Product/Parameter/ParameterRepository.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Model/Product/Parameter/ParameterRepository.php b/src/Model/Product/Parameter/ParameterRepository.php index b8ec84a921..f33d8a4176 100644 --- a/src/Model/Product/Parameter/ParameterRepository.php +++ b/src/Model/Product/Parameter/ParameterRepository.php @@ -276,13 +276,15 @@ protected function getProductParameterValuesByProductSortedByOrderingPriorityAnd ->from(ProductParameterValue::class, 'ppv') ->join('ppv.parameter', 'p') ->join('p.translations', 'pt') + ->leftJoin('p.group', 'pg') ->where('ppv.product = :product_id') ->andWhere('pt.locale = :locale') ->setParameters([ 'product_id' => $product->getId(), 'locale' => $locale, ]) - ->orderBy('p.position', 'ASC') + ->orderBy('p.orderingPriority', 'DESC') + ->addOrderBy('pg.position', 'ASC') ->addOrderBy('pt.name'); }