|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function isReductionCatalogDisplayed(ProductFamilyInterface $productFamily): bool |
|
|
public function isReductionCatalogDisplayed(ProductFamilyInterface $productFamily): bool |
|
|
{ |
|
|
{ |
|
|
$reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant) |
|
|
|
|
|
->getByProductFamily($productFamily); |
|
|
|
|
|
|
|
|
//TODO à discuter |
|
|
|
|
|
// $reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant) |
|
|
|
|
|
// ->getByProductFamily($productFamily); |
|
|
|
|
|
|
|
|
return $this->hasReductionCatalog($productFamily) && $reductionCatalog->isDisplayed(); |
|
|
|
|
|
|
|
|
return $this->hasReductionCatalog($productFamily) && $productFamily->getReductionCatalog()->isDisplayed(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function hasReductionCatalog(ProductFamilyInterface $productFamily): bool |
|
|
public function hasReductionCatalog(ProductFamilyInterface $productFamily): bool |
|
|
|
|
|
|
|
|
$reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant) |
|
|
$reductionCatalog = $this->reductionCatalogStore->setMerchant($this->merchant) |
|
|
->getByProductFamily($productFamily); |
|
|
->getByProductFamily($productFamily); |
|
|
|
|
|
|
|
|
return (bool)$reductionCatalog; |
|
|
|
|
|
|
|
|
return (bool)$productFamily->getReductionCatalog(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function getByParentCategory( |
|
|
public function getByParentCategory( |