Skip to content

Commit 1c15ae5

Browse files
author
Aurélien FOUCRET
committed
Smile ElasticSearch - Fix bug on query creation - Current Store to detect language was always used. Now collection store id is enforced
1 parent 62f65fe commit 1c15ae5

File tree

1 file changed

+1
-14
lines changed
  • src/app/code/community/Smile/ElasticSearch/Model/Resource/Catalog/Product

1 file changed

+1
-14
lines changed

src/app/code/community/Smile/ElasticSearch/Model/Resource/Catalog/Product/Collection.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,6 @@ class Smile_ElasticSearch_Model_Resource_Catalog_Product_Collection extends Mage
4242
*/
4343
protected $_sortBy = array();
4444

45-
46-
/**
47-
* Add some fields to filter.
48-
*
49-
* @param array $fields Field to be filtered and filter values
50-
*
51-
* @return Smile_ElasticSearch_Model_Resource_Catalog_Product_Collection
52-
*/
53-
public function addFieldsToFilter($fields)
54-
{
55-
return $this;
56-
}
57-
5845
/**
5946
* Stores query text filter.
6047
*
@@ -211,7 +198,7 @@ public function getSearchEngineQuery()
211198
$this->_searchEngineQuery = $this->_engine->createQuery('product');
212199

213200
if ($this->getStoreId()) {
214-
$store = Mage::app()->getStore();
201+
$store = Mage::app()->getStore($this->getStoreId());
215202
$this->_searchEngineQuery->setLanguageCode(Mage::helper('smile_elasticsearch')->getLanguageCodeByStore($store));
216203
}
217204
}

0 commit comments

Comments
 (0)