# Search result not redirecting to main variant product detail page

**URL:** <https://forum.shopware.com/t/search-result-not-redirecting-to-main-variant-product-detail-page/108352>\
**Category:** Shopware 6 (English)\
**Created:** [10. Dezember 2025 um 20:48 UTC](https://forum.shopware.com/t/search-result-not-redirecting-to-main-variant-product-detail-page/108352 "2025-12-10T20:48:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gychem](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@gychem](https://forum.shopware.com/u/gychem)\
**Post date:** [10. Dezember 2025 um 20:48 UTC](https://forum.shopware.com/t/search-result-not-redirecting-to-main-variant-product-detail-page/108352/1 "2025-12-10T20:48:50Z")

</div>

Hi!

For a specific product we have configured a main variant in the storefront presentation. When opening the product via the category listing it correctly redirects to (pre-selects) that main variant on the product detail page.

The issue is that when opening the product from the search results it opens a different variant while we would prefer that this also opens the same variant as set in the storefront presentation.

Anyone has an idea how we could achieve this? Thanks in advanca!

Kind regards,  
Gychem

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [11. Dezember 2025 um 08:45 UTC](https://forum.shopware.com/t/search-result-not-redirecting-to-main-variant-product-detail-page/108352/2 "2025-12-11T08:45:03Z")

</div>

I saw the other day this topic. Either it was an option in the settings, or a bug issue in GitHub. Not sure what it was. Which Shopware version do you use?

---

<div class="post-metadata">

**Author:** ![gychem](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@gychem](https://forum.shopware.com/u/gychem)\
**Post date:** [11. Dezember 2025 um 09:47 UTC](https://forum.shopware.com/t/search-result-not-redirecting-to-main-variant-product-detail-page/108352/3 "2025-12-11T09:47:13Z")

</div>

Hi Max! Thanks for your reply.  
This is the current Shopware version: 6.6.10.8

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [11. Dezember 2025 um 10:19 UTC](https://forum.shopware.com/t/search-result-not-redirecting-to-main-variant-product-detail-page/108352/4 "2025-12-11T10:19:41Z")

</div>

I guess this is the issue, right?

> <https://github.com/shopware/shopware/issues/13726>
>
> \### Shopware Version
> 
> 6.6.10.8
> 
> \### Affected area / extension
> 
> Platform(Default)…
> 
> \### Actual behaviour
> 
> With issue \[#11001\](https://github.com/shopware/shopware/issues/11001) a change to the search has been introduced and then merged back from 6.7 to 6.6.10.8 via \[#12340\](https://github.com/shopware/shopware/pull/12340).
> 
> First, it should not have been introduced in a patch version but to the next 6.6.11.x because it's a feature which changes the behavior of existing code. But it's also solved incorrectly so it breaks expected behavior with displaying the main variant in the search.
> 
> For the search with "green" the green variant is selected. But for the search with a product number now displays a random\* variant instead of the main variant. This is a real use case for us. Most searches in our shop are with product\_number and we need to select a specific variant.
> 
> \\\*"Random" = the first variant selected by the query collapsed by the GROUP BY of displayGroup. Usually the variant with the smallest uuid.
> 
> \### Expected behaviour
> 
> \- A search for "green" should still select the green variant instead the main variant
> \- A search for a product number should select the main variant
> \- In general I suggest to revert the logic in \`resolvePreviews\`, and then changing the search logic by first fetching matched variants, and if the main variant is part of the matched variants, then it should be selected. Else the first matched variant.
> 
> Example Product AAA
> \- variant AAA.1 "red"
> \- variant AAA.2 "green"
> \- variant AAA.3 "blue" - Main Variant
> \- variant AAA.4 "yellow"
> \- variant AAA.5 "white"
> 
> =\> Search for "green" selects only variant AAA.2 =\> Variant AAA.2 should be displayed
> =\> Search for "AAA" selects all variants =\> Main Variant AAA.3 should be displayed
> 
> 
> \### How to reproduce
> 
> See \[#11001\](https://github.com/shopware/shopware/issues/11001)

---

<div class="post-metadata">

**Author:** ![gychem](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@gychem](https://forum.shopware.com/u/gychem)\
**Post date:** [15. Dezember 2025 um 21:40 UTC](https://forum.shopware.com/t/search-result-not-redirecting-to-main-variant-product-detail-page/108352/5 "2025-12-15T21:40:31Z")

</div>

Thanks Max! It seems related to this issue.
