gychem
10. Dezember 2025 um 20:48
1
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
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?
gychem
11. Dezember 2025 um 09:47
3
Hi Max! Thanks for your reply.
This is the current Shopware version: 6.6.10.8
I guess this is the issue, right?
offen 09:18AM - 27 Nov 25 UTC
priority/high
Platform(Default)
domain/inventory
### 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)
gychem
15. Dezember 2025 um 21:40
5
Thanks Max! It seems related to this issue.