Browse Source

Merge branch 'develop' of https://gitea.laclic.fr/Placedulocal/Symfony into develop

# Conflicts:
#	Lc
feature/module_traiteur_v1
Guillaume 4 years ago
parent
commit
52115b3602
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      ShopBundle/Services/Order/OrderUtilsStockTrait.php

+ 7
- 1
ShopBundle/Services/Order/OrderUtilsStockTrait.php View File

@@ -66,7 +66,13 @@ trait OrderUtilsStockTrait

$allCategoriesSalesOff = true;
foreach ($product->getProductFamily()->getProductCategories() as $category){
if($category->getSaleStatus())$allCategoriesSalesOff = false;
if($category->getParent()) {
if($category->getSaleStatus() && $category->getParent()->getSaleStatus())
$allCategoriesSalesOff = false;
}
else {
if($category->getSaleStatus()) $allCategoriesSalesOff = false;
}
}
if($allCategoriesSalesOff) return false;


Loading…
Cancel
Save