@@ -170,6 +170,16 @@ class ProductFamilySolver | |||
return $productsOnlineArray; | |||
} | |||
public function getFirstProductOnline(ProductFamilyInterface $productFamily): ?ProductInterface | |||
{ | |||
$productsOnlineArray = $this->getProductsOnline($productFamily); | |||
if(count($productsOnlineArray) > 0) { | |||
return $productsOnlineArray[0]; | |||
} | |||
return null; | |||
} | |||
public function getReductionCatalogInherited(ProductFamilyInterface $productFamily): ?ReductionCatalogInterface | |||
{ | |||
return $productFamily->getReductionCatalog(); |