-
Notifications
You must be signed in to change notification settings - Fork 9.4k
M2.2.6 : "Order by price" not working in product listing #18264
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
Comments
Hi @kanduvisla. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @kanduvisla do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
I've did some more research and I found the following to trigger this bug:
So if you want to reproduce this issue:
So the bug is probably in the indexing process. I also tested with a special price of |
I encountered this same issue. |
Same for me. Do you have any temporary fix for indexer? |
If I look at the price indexing process, I see the following in
If I understand this correctly, the
I did a very small local test, only with simple products, but this seems to fix the issue in my case. But then again: IMHO price indexing is one of the trickiest things in Magento and I don't feel comfortable by tinkering with it. Can anyone shine a bit more light on this? |
I found the core of the problem: It's a mixup between 14ab8ac#diff-5a30a751305f50e9d7bbd8a2576a2b46 I'll backport this issue to the 2.2-dev branch as well and send a PR. |
I've created a PR for this issue for the 2.2 branch: |
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets |
Hi @kanduvisla. Thank you for your report. The fix will be available with the upcoming 2.2.8 release. |
I would not create a new issue for the same problem so will re-open this one. |
We also have the same issue with M2.3.1 |
We also have the same issue in 2.2.7 even after applying the patches mentioned here |
I got it working when I applied the fix mentioned by gavinlimely at #7367 |
I'm running into the issue on a Magento 2.2.6 installation the "order by price" option for a product listing is not working. Neither ascending or descending.
Preconditions
Steps to reproduce
I'm not sure if it is part of the conditions to reproduce the problem but:
Expected result
As a customer, If I order a product listing on price, the products should be ordered on price.
Actual result
They aren't
Own research
If I look at the query that is eventually created by
\Magento\Catalog\Block\Product\ListProduct::initializeProductCollection()
, I get the following result:The main thing I notice here is that it gets ordered by
price_index.min_price
. But if I look at my price index,min_price
is set to0
everywhere, except for the products that have a special price set.This caused me to look at the
catalog_product_price_index
-table where I saw the same: almost all products have amin_price
of 0, except the products that have special price set.A
bin/magento indexer:reindex
or a re-save of the product does not change the price index.So the problem might be the product listing (should it perhaps use a different column from the price index?) or should the price index have a min_price of at least the default price for regular products?
The text was updated successfully, but these errors were encountered: