Browse Source

Merge branch 'develop'

master
Guillaume 4 years ago
parent
commit
151b20e07f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      ShopBundle/Repository/ProductCategoryRepository.php

+ 3
- 1
ShopBundle/Repository/ProductCategoryRepository.php View File

@@ -52,6 +52,7 @@ class ProductCategoryRepository extends BaseRepository implements DefaultReposit
{
$query = $this->createQueryBuilder('e');
$query->andWhere('e.parent = :idParentCategory');
$query->setParameter('idParentCategory', $parentCategory->getId());

if ($withOffline) $query->andWhere('e.status >= 0');
else $query->andWhere('e.status = 1');
@@ -61,7 +62,8 @@ class ProductCategoryRepository extends BaseRepository implements DefaultReposit
$query->andWhere('pf.status = 1') ;
}

$query->setParameter('idParentCategory', $parentCategory->getId());
$query->addOrderBy('e.position', 'ASC') ;

return $query->getQuery()->getResult();
}
}

Loading…
Cancel
Save