Browse Source

Correctif statistiques

develop
Guillaume 2 years ago
parent
commit
1584d28ca3
1 changed files with 10 additions and 7 deletions
  1. +10
    -7
      Statistic/Product/ProductsSalesStatistic.php

+ 10
- 7
Statistic/Product/ProductsSalesStatistic.php View File

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


Loading…
Cancel
Save