Przeglądaj źródła

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Fabien Normand 3 lat temu
rodzic
commit
3f3ad3d23a
2 zmienionych plików z 10 dodań i 4 usunięć
  1. +3
    -3
      Repository/Order/OrderShopRepositoryQuery.php
  2. +7
    -1
      Repository/Order/OrderShopStore.php

+ 3
- 3
Repository/Order/OrderShopRepositoryQuery.php Wyświetl plik

@@ -152,11 +152,11 @@ class OrderShopRepositoryQuery extends AbstractRepositoryQuery
->setParameter('year', $year);
}

public function filterByDistributions(array $distributions): self
public function filterByDistributions(array $distributionArray): self
{
return $this
->andWhere('.distribution IN(:distributions)')
->setParameter('distributions', $distributions);
->andWhere('.distribution IN (:distributions)')
->setParameter('distributions', $distributionArray);
}

public function filterByProducts(array $products): self

+ 7
- 1
Repository/Order/OrderShopStore.php Wyświetl plik

@@ -89,7 +89,7 @@ class OrderShopStore extends AbstractStore

public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
$query->orderBy('id', 'DESC');
//$query->orderBy('id', 'DESC');
return $query;
}

@@ -392,6 +392,10 @@ class OrderShopStore extends AbstractStore
$query->filterByDistribution($params['distribution']);
}

if (isset($params['distributions'])) {
$query->filterByDistributions($params['distributions']);
}

if (isset($params['isCart'])) {
$query->filterByStatus(OrderStatusModel::$statusAliasAsCart);
}
@@ -428,6 +432,7 @@ class OrderShopStore extends AbstractStore
if (isset($params['excludeComplementaryOrderShops']) || isset($params['mergeComplementaryOrderShops'])) {
$query->filterIsNullMainOrderShop();
}

if (isset($params['joinProductFamily'])) {
$query->joinProductFamily(true);
}
@@ -442,6 +447,7 @@ class OrderShopStore extends AbstractStore
if (isset($params['groupBy'])) {
$query->groupBy($params['groupBy']);
}

return $query;
}


Ładowanie…
Anuluj
Zapisz