Browse Source

OrderShopStore : filterMinimumTomorrowDelivery

packProduct
Guillaume 3 years ago
parent
commit
56aa8b9ce3
3 changed files with 10 additions and 1 deletions
  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 View File

->andWhere('.mainOrderShop IS NULL'); ->andWhere('.mainOrderShop IS NULL');
} }


public function filterMinimumTomorrowDelivery(): self
{
return $this->andWhere('.deliveryDate > :today')->setParameter('today', (new DateTime())->setTime(23, 59));
}

public function selectOrderReductionCarts(): self public function selectOrderReductionCarts(): self
{ {
$this->joinOrderReductionCarts(); $this->joinOrderReductionCarts();

+ 4
- 0
Repository/Order/OrderShopStore.php View File

$query->filterByAddress($params['address']); $query->filterByAddress($params['address']);
} }


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

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

+ 1
- 1
Repository/Product/ProductCategoryStore.php View File



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



Loading…
Cancel
Save