Skip to content

Commit 62dd1fb

Browse files
ENGCOM-4268: Elasticsearch price fieldname is incorrect during indexing when storeId and websiteId do not match #21216
- Merge Pull Request #21216 from XSARUS/magento2:2.3-develop - Merged commits: 1. f53d78d 2. 1232e6d
2 parents 08fbdf1 + 1232e6d commit 62dd1fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/Elasticsearch/Model/Adapter/BatchDataMapper/PriceFieldsProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,15 @@ public function __construct(
7272
*/
7373
public function getFields(array $productIds, $storeId)
7474
{
75+
$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();
76+
7577
$priceData = $this->dataProvider->getSearchableAttribute('price')
7678
? $this->resourceIndex->getPriceIndexData($productIds, $storeId)
7779
: [];
7880

7981
$fields = [];
8082
foreach ($productIds as $productId) {
81-
$fields[$productId] = $this->getProductPriceData($productId, $storeId, $priceData);
83+
$fields[$productId] = $this->getProductPriceData($productId, $websiteId, $priceData);
8284
}
8385

8486
return $fields;

0 commit comments

Comments
 (0)