Skip to content

Commit

Permalink
ENGCOM-4268: Elasticsearch price fieldname is incorrect during indexi…
Browse files Browse the repository at this point in the history
…ng when storeId and websiteId do not match #21216
  • Loading branch information
sidolov authored Apr 3, 2019
2 parents 8fc9670 + 62dd1fb commit 018a94b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ public function __construct(
*/
public function getFields(array $productIds, $storeId)
{
$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();

$priceData = $this->dataProvider->getSearchableAttribute('price')
? $this->resourceIndex->getPriceIndexData($productIds, $storeId)
: [];

$fields = [];
foreach ($productIds as $productId) {
$fields[$productId] = $this->getProductPriceData($productId, $storeId, $priceData);
$fields[$productId] = $this->getProductPriceData($productId, $websiteId, $priceData);
}

return $fields;
Expand Down

0 comments on commit 018a94b

Please sign in to comment.