|
|
|
|
|
|
|
|
|
|
|
|
|
|
$allCategoriesSalesOff = true; |
|
|
$allCategoriesSalesOff = true; |
|
|
foreach ($product->getProductFamily()->getProductCategories() as $category){ |
|
|
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; |
|
|
if($allCategoriesSalesOff) return false; |
|
|
|
|
|
|