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

 - Merge Pull Request #21216 from XSARUS/magento2:2.3-develop
 - Merged commits:
   1. f53d78d
   2. 1232e6d
  • Loading branch information
magento-engcom-team committed Mar 29, 2019
2 parents 08fbdf1 + 1232e6d commit 62dd1fb
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 62dd1fb

Please sign in to comment.