Skip to content

Commit 7d297af

Browse files
committed
MAGE-840 Fix bug with building attribute array when customer group pricing is off
1 parent 4967683 commit 7d297af

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Helper/ConfigHelper.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,16 +1156,17 @@ public function getSortingIndices(
11561156
}
11571157
}
11581158
$attrsToReturn = [];
1159-
if (count($attributesToAdd)) {
1160-
foreach ($attrs as $attr) {
1161-
if ($attr['attribute'] == self::SORT_ATTRIBUTE_PRICE && isset($attributesToAdd[$attr['sort']])) {
1162-
$attrsToReturn = array_merge($attrsToReturn, $attributesToAdd[$attr['sort']]);
1163-
} else {
1164-
$attrsToReturn[] = $attr;
1165-
}
1159+
1160+
foreach ($attrs as $attr) {
1161+
if ($attr['attribute'] == self::SORT_ATTRIBUTE_PRICE
1162+
&& count($attributesToAdd)
1163+
&& isset($attributesToAdd[$attr['sort']])) {
1164+
$attrsToReturn = array_merge($attrsToReturn, $attributesToAdd[$attr['sort']]);
1165+
} else {
1166+
$attrsToReturn[] = $attr;
11661167
}
11671168
}
1168-
1169+
11691170
if ($useCache) {
11701171
$this->_sortingIndices[$storeId] = $attrsToReturn;
11711172
}

0 commit comments

Comments
 (0)