diff --git a/src/Eccube/Repository/ProductRepository.php b/src/Eccube/Repository/ProductRepository.php index 28d541934c4..e36a3aae75e 100644 --- a/src/Eccube/Repository/ProductRepository.php +++ b/src/Eccube/Repository/ProductRepository.php @@ -109,8 +109,9 @@ public function getQueryBuilderBySearchData($searchData) //@see http://doctrine-orm.readthedocs.org/en/latest/reference/dql-doctrine-query-language.html $qb->addSelect('MIN(pc.price02) as HIDDEN price02_min'); $qb->innerJoin('p.ProductClasses', 'pc'); - $qb->groupBy('p'); + $qb->groupBy('p.id'); $qb->orderBy('price02_min', 'ASC'); + $qb->addOrderBy('p.id', 'DESC'); // 新着順 } else if (!empty($searchData['orderby']) && $searchData['orderby']->getId() == '2') { $qb->orderBy('p.create_date', 'DESC');