Bladeren bron

Correctif produit avec reductioncatalog #14

develop
Fabien Normand 2 jaren geleden
bovenliggende
commit
f84181b417
2 gewijzigde bestanden met toevoegingen van 10 en 17 verwijderingen
  1. +0
    -17
      Repository/Product/ProductFamilyStore.php
  2. +10
    -0
      Solver/Product/ProductFamilySolver.php

+ 0
- 17
Repository/Product/ProductFamilyStore.php Bestand weergeven

@@ -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,

+ 10
- 0
Solver/Product/ProductFamilySolver.php Bestand weergeven

@@ -506,5 +506,15 @@ class ProductFamilySolver

return $title;
}

public function isReductionCatalogDisplayed(ProductFamilyInterface $productFamily): bool
{
return $this->hasReductionCatalog($productFamily) && $productFamily->getReductionCatalog()->isDisplayed();
}

public function hasReductionCatalog(ProductFamilyInterface $productFamily): bool
{
return (bool)$productFamily->getReductionCatalog();
}
}


Laden…
Annuleren
Opslaan