Skip to content

Commit 301699a

Browse files
committed
Merge pull request #5310 in SW/shopware from sw-19519/5.3/add-number-to-search-condition to 5.3
* commit '283e2134cedf796ffc7498384e14312a945156af': SW-19519 - Add main detail number as search field
2 parents 5bd198b + 283e213 commit 301699a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

engine/Shopware/Controllers/Backend/Search.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*/
2424

2525
use Doctrine\DBAL\Connection;
26+
use Shopware\Models\Article\Article;
2627

2728
/**
2829
* Backend search controller
@@ -353,6 +354,12 @@ private function addSearchTermCondition($entity, $query, $term)
353354
return 'entity.' . $field;
354355
}, $fields);
355356

357+
switch ($entity) {
358+
case Article::class:
359+
$fields[] = 'mainDetail.number';
360+
break;
361+
}
362+
356363
$builder->addSearchTerm($query, $term, $fields);
357364
}
358365

0 commit comments

Comments
 (0)