Skip to content

Commit

Permalink
Merge pull request #963 from algolia/fix/distinct
Browse files Browse the repository at this point in the history
Select only unique products on reindex
  • Loading branch information
Jan Petr authored Nov 13, 2017
2 parents 5eb7c4e + c717a04 commit 9bd994f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public function getProductCollectionQuery($storeId, $productIds = null, $only_vi

$products = $products->setStoreId($storeId);
$products = $products->addStoreFilter($storeId);
$products = $products->distinct(true);

if ($productIds && count($productIds) > 0) {
$products = $products->addAttributeToFilter('entity_id', array('in' => $productIds));
Expand Down

0 comments on commit 9bd994f

Please sign in to comment.