Browse Source

OrderShopStore : correctif excludeComplementaryOrderShops

packProduct
Guillaume 2 years ago
parent
commit
ae70e23460
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      Repository/Order/OrderShopStore.php

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

@@ -362,7 +362,7 @@ class OrderShopStore extends AbstractStore

$orderShops = $query->find();

if (isset($params['mergeComplementaryOrderShops'])) {
if (isset($params['mergeComplementaryOrderShops']) && $params['mergeComplementaryOrderShops'] == true) {
foreach ($orderShops as $orderShop) {
$this->orderShopSolver->mergeComplentaryOrderShops($orderShop);
}
@@ -429,12 +429,13 @@ class OrderShopStore extends AbstractStore
$query->filterMinimumTomorrowDelivery();
}

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

if (isset($params['excludeComplementaryOrderShops']) || isset($params['mergeComplementaryOrderShops'])) {
if ( (isset($params['excludeComplementaryOrderShops']) && $params['excludeComplementaryOrderShops'])
|| (isset($params['mergeComplementaryOrderShops']) && $params['mergeComplementaryOrderShops'])) {
$query->filterIsNullMainOrderShop();
}


Loading…
Cancel
Save