Bläddra i källkod

OrderShopStore : filterMinimumTomorrowDelivery

packProduct
Guillaume 2 år sedan
förälder
incheckning
56aa8b9ce3
3 ändrade filer med 10 tillägg och 1 borttagningar
  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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

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

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


Laddar…
Avbryt
Spara