Browse Source

Correctif #14

develop
Fab 2 years ago
parent
commit
4dc04dbcf0
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      Repository/Product/ProductFamilyStore.php

+ 5
- 4
Repository/Product/ProductFamilyStore.php View File



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(

Loading…
Cancel
Save