@@ -43,14 +43,17 @@ class ProductsSalesStatistic extends Statistic | |||
'label' => 'Total ventes' | |||
] | |||
); | |||
foreach ($this->productFamily->getProducts() as $product) { | |||
$this->productIds[$product->getId()] = $product; | |||
$this->addProperty( | |||
$product->getId(), | |||
[ | |||
'label' => $product->getTitle() | |||
] | |||
); | |||
if($product->getId()) { | |||
$this->productIds[$product->getId()] = $product; | |||
$this->addProperty( | |||
$product->getId(), | |||
[ | |||
'label' => $product->getTitle() | |||
] | |||
); | |||
} | |||
} | |||
} | |||