Skip to content

Commit 7c0b922

Browse files
author
Oleksandr Iegorov
committed
MC-43176: GraphQL returns the price ranges of a simple product on another store
1 parent ba1bd4e commit 7c0b922

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Product/PriceRange.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public function resolve(
6464
/** @var Product $product */
6565
$product = $value['model'];
6666
$product->unsetData('minimal_price');
67+
// add store filter for the product
68+
$product->setData(self::STORE_FILTER_CACHE_KEY, $store);
6769

6870
if ($context) {
6971
$customerGroupId = $context->getExtensionAttributes()->getCustomerGroupId();
@@ -95,8 +97,6 @@ public function resolve(
9597
*/
9698
private function getMinimumProductPrice(SaleableInterface $product, StoreInterface $store): array
9799
{
98-
// add store filter for the product
99-
$product->setData(self::STORE_FILTER_CACHE_KEY, $store);
100100
$priceProvider = $this->priceProviderPool->getProviderByProductType($product->getTypeId());
101101
$regularPrice = $priceProvider->getMinimalRegularPrice($product)->getValue();
102102
$finalPrice = $priceProvider->getMinimalFinalPrice($product)->getValue();

0 commit comments

Comments
 (0)