Bladeren bron

OrderShopStore : filterMinimumTomorrowDelivery

packProduct
Guillaume 3 jaren geleden
bovenliggende
commit
56aa8b9ce3
3 gewijzigde bestanden met toevoegingen van 10 en 1 verwijderingen
  1. +5
    -0
      Repository/Order/OrderShopRepositoryQuery.php
  2. +4
    -0
      Repository/Order/OrderShopStore.php
  3. +1
    -1
      Repository/Product/ProductCategoryStore.php

+ 5
- 0
Repository/Order/OrderShopRepositoryQuery.php Bestand weergeven

@@ -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();

+ 4
- 0
Repository/Order/OrderShopStore.php Bestand weergeven

@@ -408,6 +408,10 @@ class OrderShopStore extends AbstractStore
$query->filterByAddress($params['address']);
}

if(isset($params['minimumTomorrowDelivery'])) {
$query->filterMinimumTomorrowDelivery();
}

if (isset($params['mergeComplementaryOrderShops'])) {
$query
->joinComplementaryOrderShops();

+ 1
- 1
Repository/Product/ProductCategoryStore.php Bestand weergeven

@@ -26,7 +26,7 @@ class ProductCategoryStore extends AbstractStore

public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
$query->filterBySection($this->section);
$this->addFilterBySectionOptionnal($query);
return $query;
}


Laden…
Annuleren
Opslaan