-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting for price does not use discounted prices but the original prices #1137
Comments
Instead of
I came up with this snippet which works for me, but it certainly needs more tests. I only applied one discount at a time.
|
This could be challenging to solve completely (including MegaSearch) because therefore all prices for all published currencies have to be calculated and saved in the search index. The above sorting only applies to the standard search via Linq. It's only a "half solution" because price filtering is also affected. Several of the fields do not have a database index, which can affect performance. |
My snippet also only sorts by product applied discounts, category discounts are not taken into account. But overall I think it is something which should be addressed, since sort by price is often used by customers looking through sale categories or weekly specials. |
Describe the bug
We have a category for our special sale products with discounts ranging from 10% to 40%.
But if we sort by price (up or down), the sorting does not sort by effective price but original price or the product.
Reproduced it in demo shop.
The text was updated successfully, but these errors were encountered: