Sfoglia il codice sorgente

Correctif produit avec reductioncatalog #14

develop
Fabien Normand 2 anni fa
parent
commit
f84181b417
2 ha cambiato i file con 10 aggiunte e 17 eliminazioni
  1. +0
    -17
      Repository/Product/ProductFamilyStore.php
  2. +10
    -0
      Solver/Product/ProductFamilySolver.php

+ 0
- 17
Repository/Product/ProductFamilyStore.php Vedi File

@@ -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 Vedi File

@@ -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();
}
}


Loading…
Annulla
Salva