We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02e0378 commit 8b13f99Copy full SHA for 8b13f99
app/code/Magento/CatalogSearch/Model/Advanced.php
@@ -166,7 +166,6 @@ public function __construct(
166
public function addFilters($values)
167
{
168
$attributes = $this->getAttributes();
169
- $hasConditions = false;
170
$allConditions = [];
171
172
foreach ($attributes as $attribute) {
@@ -225,7 +224,7 @@ public function addFilters($values)
225
224
if ($allConditions) {
226
$this->_registry->register('advanced_search_conditions', $allConditions);
227
$this->getProductCollection()->addFieldsToFilter($allConditions);
228
- } elseif (!$hasConditions) {
+ } else {
229
throw new LocalizedException(__('Please specify at least one search term.'));
230
}
231
0 commit comments