# Conflicts: # Lcfeature/module_traiteur_v1
@@ -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; | |||