Skip to content

Commit

Permalink
Search taxon and product in name, slug and code
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Apr 9, 2024
1 parent b06114f commit 5814a1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Provider/ProductUrlProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function getResults(string $locale, string $search = ''): iterable

if (!empty($search)) {
$queryBuilder
->andWhere('translation.name LIKE :search')
->andWhere('translation.name LIKE :search OR o.code LIKE :search OR translation.slug LIKE :search')
->setParameter('search', '%' . $search . '%')
;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/TaxonUrlProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function getResults(string $locale, string $search = ''): iterable

if (!empty($search)) {
$queryBuilder
->andWhere('translation.name LIKE :search')
->andWhere('translation.name LIKE :search OR o.code LIKE :search OR translation.slug LIKE :search')
->setParameter('search', '%' . $search . '%')
;
}
Expand Down

0 comments on commit 5814a1d

Please sign in to comment.