瀏覽代碼

Correctif position catégories

feature/export_comptable
Guillaume 4 年之前
父節點
當前提交
1d73ab19aa
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      ShopBundle/Repository/ProductCategoryRepository.php

+ 3
- 1
ShopBundle/Repository/ProductCategoryRepository.php 查看文件

@@ -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…
取消
儲存