Skip to content

Commit a177a77

Browse files
authored
Added some changes to consolidate the backend query (#911)
1 parent 794242d commit a177a77

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Controller/Adminhtml/System/Config/Save.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ private function handleDeactivatedSerializedArrays($groups)
2525
}
2626
}
2727

28+
if (isset($groups['instant']['fields']['is_instant_enabled']['value'])
29+
&& $groups['instant']['fields']['is_instant_enabled']['value'] == '1') {
30+
$groups['instant']['fields']['backend_rendering_enable']['value'] = '0';
31+
}
32+
2833
return $groups;
2934
}
3035
}

Helper/Data.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ public function getSearchResult($query, $storeId, $searchParams = null, $targete
145145
}
146146
}
147147

148-
return [$data, $answer['nbHits'], $answer['facets']];
148+
$facetsFromAnswer = isset($answer['facets']) ? $answer['facets'] : [];
149+
150+
return [$data, $answer['nbHits'], $facetsFromAnswer];
149151
}
150152

151153
public function rebuildStoreAdditionalSectionsIndex($storeId)

Model/Layer/Filter/Item/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getRemoveUrl()
4747
}
4848
}
4949

50-
$resetValue = null;
50+
$resetValue = [];
5151

5252
if (!is_null($idToRemove)) {
5353
$resetValue = array_diff($this->getApplyValue(), [$idToRemove]);

0 commit comments

Comments
 (0)