Skip to content

Commit

Permalink
Merge pull request bagisto#10548 from amit-webkul/2.0
Browse files Browse the repository at this point in the history
🔨 fix: update product search engine.
  • Loading branch information
devansh-webkul authored Feb 12, 2025
2 parents 2bce750 + 7e55077 commit 9cbb688
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ public function index(Request $request)
]);
}

$product = $this->productRepository->findBySlug($slugOrURLKey);
if (core()->getConfigData('catalog.products.search.engine') == 'elastic') {
$searchEngine = core()->getConfigData('catalog.products.search.storefront_mode');
}

$product = $this->productRepository
->setSearchEngine($searchEngine ?? 'database')
->findBySlug($slugOrURLKey);

if ($product) {
if (
Expand Down

0 comments on commit 9cbb688

Please sign in to comment.