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'); }