Skip to content

Commit

Permalink
SW-19519 - Add main detail number as search field
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverSkroblin committed Aug 8, 2017
1 parent 5bd198b commit 283e213
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions engine/Shopware/Controllers/Backend/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

use Doctrine\DBAL\Connection;
use Shopware\Models\Article\Article;

/**
* Backend search controller
Expand Down Expand Up @@ -353,6 +354,12 @@ private function addSearchTermCondition($entity, $query, $term)
return 'entity.' . $field;
}, $fields);

switch ($entity) {
case Article::class:
$fields[] = 'mainDetail.number';
break;
}

$builder->addSearchTerm($query, $term, $fields);
}

Expand Down

0 comments on commit 283e213

Please sign in to comment.