Skip to content

Commit acac3a5

Browse files
author
Serhii Balko
committed
MC-41885: [Magento Cloud] GraphQL | Attribute sorting issue
1 parent 9a691c0 commit acac3a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace Magento\CatalogGraphQl\DataProvider\Product\LayeredNavigation;
99

1010
use Magento\Framework\App\ResourceConnection;
11+
use Magento\Framework\DB\Select;
1112
use Magento\Store\Model\Store;
1213

1314
/**
@@ -96,7 +97,7 @@ public function getOptions(array $optionIds, ?int $storeId, array $attributeCode
9697
'a.attribute_id = options.attribute_id AND option_value.store_id = ?',
9798
Store::DEFAULT_STORE_ID
9899
)->order(
99-
'options.sort_order ' . \Zend_Db_Select::SQL_ASC
100+
'options.sort_order ' . Select::SQL_ASC
100101
);
101102

102103
$select->where('option_value.option_id IN (?)', $optionIds);
@@ -114,11 +115,11 @@ public function getOptions(array $optionIds, ?int $storeId, array $attributeCode
114115
/**
115116
* Format result
116117
*
117-
* @param \Magento\Framework\DB\Select $select
118+
* @param Select $select
118119
* @return array
119120
* @throws \Zend_Db_Statement_Exception
120121
*/
121-
private function formatResult(\Magento\Framework\DB\Select $select): array
122+
private function formatResult(Select $select): array
122123
{
123124
$statement = $this->resourceConnection->getConnection()->query($select);
124125

0 commit comments

Comments
 (0)