@@ -212,6 +212,11 @@ class OrderShopRepositoryQuery extends AbstractRepositoryQuery | |||
->andWhere('.mainOrderShop IS NULL'); | |||
} | |||
public function filterMinimumTomorrowDelivery(): self | |||
{ | |||
return $this->andWhere('.deliveryDate > :today')->setParameter('today', (new DateTime())->setTime(23, 59)); | |||
} | |||
public function selectOrderReductionCarts(): self | |||
{ | |||
$this->joinOrderReductionCarts(); |
@@ -408,6 +408,10 @@ class OrderShopStore extends AbstractStore | |||
$query->filterByAddress($params['address']); | |||
} | |||
if(isset($params['minimumTomorrowDelivery'])) { | |||
$query->filterMinimumTomorrowDelivery(); | |||
} | |||
if (isset($params['mergeComplementaryOrderShops'])) { | |||
$query | |||
->joinComplementaryOrderShops(); |
@@ -26,7 +26,7 @@ class ProductCategoryStore extends AbstractStore | |||
public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface | |||
{ | |||
$query->filterBySection($this->section); | |||
$this->addFilterBySectionOptionnal($query); | |||
return $query; | |||
} | |||