You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@kingschnulli not entirely in my case. As I described I have to switch order, the sortings are added to the criteria. Only after that it works correctly.
This only occurs, if the variants of a product have different prices. Then the availability-sorting is applied AFTER the price-sorting, which leaves us with a selected unavailable variant, if all variants with the cheapest price are unavailable.
PHP Version
8.2
Shopware Version
6.5.7.4
Expected behaviour
There is always a available variant selected by default on a product detail page (if there are any available).
Actual behaviour
The cheapest variant is selected by default, disregarding the availability
How to reproduce
https://github.com/shopware/shopware/blame/trunk/src/Core/Content/Product/SalesChannel/Detail/ProductDetailRoute.php#L145
This is because this is the generated SQL:
If the two sortings get reversed, it works correctly.
The text was updated successfully, but these errors were encountered: