|
|
@@ -52,23 +52,6 @@ class ProductFamilyStore extends AbstractStore |
|
|
|
return $query; |
|
|
|
} |
|
|
|
|
|
|
|
public function isReductionCatalogDisplayed(ProductFamilyInterface $productFamily): bool |
|
|
|
{ |
|
|
|
//TODO à discuter |
|
|
|
// $reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant) |
|
|
|
// ->getByProductFamily($productFamily); |
|
|
|
|
|
|
|
return $this->hasReductionCatalog($productFamily) && $productFamily->getReductionCatalog()->isDisplayed(); |
|
|
|
} |
|
|
|
|
|
|
|
public function hasReductionCatalog(ProductFamilyInterface $productFamily): bool |
|
|
|
{ |
|
|
|
$reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant) |
|
|
|
->getByProductFamily($productFamily); |
|
|
|
|
|
|
|
return (bool)$productFamily->getReductionCatalog(); |
|
|
|
} |
|
|
|
|
|
|
|
public function getByParentCategory( |
|
|
|
ProductCategoryInterface $parentCategory, |
|
|
|
$user = null, |