Skip to content

Commit 65c71f2

Browse files
authored
Merge pull request #7891 from magento-gl/comm_24157_28878
Resolved getting correct attribute code, label value of price type attribute in aggregations data of products GraphQl response #28879
2 parents 0f6dde0 + 9b70f07 commit 65c71f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/CatalogGraphQl/DataProvider/Product/LayeredNavigation/AttributeOptionProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function getOptions(array $optionIds, ?int $storeId, array $attributeCode
110110

111111
if (!empty($attributeCodes)) {
112112
$select->orWhere(
113-
'a.attribute_code in (?) AND a.frontend_input = \'boolean\'',
113+
'a.attribute_code in (?) AND a.frontend_input in (\'boolean\', \'price\')',
114114
$attributeCodes
115115
);
116116
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchAggregationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function testAggregationCustomPriceAttribute()
125125
$priceAggregation = array_filter(
126126
$result['products']['aggregations'],
127127
function ($a) {
128-
return $a['attribute_code'] == 'product_price_attribute_bucket';
128+
return $a['attribute_code'] == 'product_price_attribute';
129129
}
130130
);
131131
$this->assertNotEmpty($priceAggregation);

0 commit comments

Comments
 (0)