Quellcode durchsuchen

Correctif produit avec reductioncatalog #14

develop
Fabien Normand vor 2 Jahren
Ursprung
Commit
f84181b417
2 geänderte Dateien mit 10 neuen und 17 gelöschten Zeilen
  1. +0
    -17
      Repository/Product/ProductFamilyStore.php
  2. +10
    -0
      Solver/Product/ProductFamilySolver.php

+ 0
- 17
Repository/Product/ProductFamilyStore.php Datei anzeigen

@@ -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 Datei anzeigen

@@ -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…
Abbrechen
Speichern