From d3a9c7bd10c178422d7c39b9df727ebc7b201278 Mon Sep 17 00:00:00 2001 From: Illia Grybkov Date: Thu, 18 Jun 2015 15:51:09 +0300 Subject: [PATCH] MAGETWO-38879: Products does displayed across all storeviews of the catalog --- app/code/Magento/CatalogSearch/Model/Resource/Engine.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Engine.php b/app/code/Magento/CatalogSearch/Model/Resource/Engine.php index 8fb3a099d233d..e5409d9f5e9e9 100644 --- a/app/code/Magento/CatalogSearch/Model/Resource/Engine.php +++ b/app/code/Magento/CatalogSearch/Model/Resource/Engine.php @@ -193,6 +193,11 @@ public function cleanIndex($storeId = null, $entityId = null, $entity = 'product { $where = []; + if ($storeId !== null) { + $where[] = $this->_getWriteAdapter() + ->quoteInto('store_id=?', $storeId); + } + if ($entityId !== null) { $where[] = $this->_getWriteAdapter() ->quoteInto('product_id IN (?)', $entityId);