Sfoglia il codice sorgente

OrderShopStore : filterMinimumTomorrowDelivery

packProduct
Guillaume 3 anni fa
parent
commit
56aa8b9ce3
3 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

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

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


Loading…
Annulla
Salva