magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.55k stars 9.32k forks source link

Sort by quantity is not working in Magento 2.4 Elastic Search #31775

Closed rahulanand77 closed 3 years ago

rahulanand77 commented 3 years ago

The magento 2.4.1 with elastic search is having issues with "Sort by quantity" on the PLP page. The sorting is not working by ASC and DESC after enabling the sorting.

Preconditions (*)

1) Magento CE 2.4.1 without sample data is installed. 2) Elastic search is installed 3) Full-text search for catalog is set to "Elastic Search"

Steps to reproduce (*)

1) Install magento 2.4.1 with Elastic search installed on the server 2) Log into admin, navigate to "Store-> Product attributes" 3) Find "quantity" attribute and set "Use in filter options" to "Yes" 4) Clear cache and browse the PLP page 5) Sort by quantity

Expected result (*)

1) The products should get sorted by quantity ASC/DESC based on their stock size

Actual result (*)

1) Magento sorting is not working based on the quantity 2) The results are remaining the same in the case of ASC and DESC sorting by quantity. The products sorting list will remain the same. 3) The MySQL query is generating properly with quantity order by param but results are not getting sorted based on available quantity.

Qty-Asc Qty-Desc

Additional info from Engcom

Two products with different quantity dif_qty Sorting by Quantity on the Storefront doesn't change the position of the products Peek 2021-01-20 17-38

m2-assistant[bot] commented 3 years ago

Hi @rahulanand77. Thank you for your report. To help us process this issue please make sure that you provided the following information:

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:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 3 years ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 3 years ago

Hello @rahulanand77

Thank you for your report.

We Confirm that the issue is reproducible. Additional info is added to the description.

magento-engcom-team commented 3 years ago

:white_check_mark: Confirmed by @engcom-Bravo Thank you for verifying the issue. Based on the provided information internal tickets MC-40524 were created

Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

rahulanand77 commented 3 years ago

Hi @magento-engcom-team,

Do we have any update on the patch to apply and fix this?

rahulanand77 commented 3 years ago

Hi @engcom-Bravo,

Do you have any update on the reported issue?

m2-assistant[bot] commented 3 years ago

Hi @engcom-Charlie. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


engcom-Bravo commented 3 years ago

Hello @rahulanand77 We have started to fix the issue. The Pull Request will be linked to this ticket.

rahulanand77 commented 3 years ago

HI,

I have applied the changes you have mentioned, still not working. Please check the link to see more details:

https://eavs-groupe.fr/smart-building/visioconference/cameras-ptz.html?product_list_order=quantity_and_stock_status

Untitled

rahulanand77 commented 3 years ago

The Model file and other di.xml and module.xml changes are applied in module "vendor/magento/module-inventory-elasticsearch" but still not working

gabrieldagama commented 3 years ago

Hi @rahulanand77, after discussion with the product owner it was clear that this is not a bug. As it is right now, that is not something we currently support and there are several concerns with its implementation, as described on the PRs that were open against this issue.

I will be closing the issue since there are no plans for developing such a feature at the moment.

magento-engcom-team commented 3 years ago

Hi @rahulanand77, @engcom-Charlie.

Thank you for your report and collaboration!

The related internal Jira ticket MC-40524 was closed as Fixed.

The fix will be available with the upcoming 2.4.3 release.

rahulanand77 commented 3 years ago

Hi @magento-engcom-team ,

This is not correct. We have upgraded to 2.4.2 thinking the fix will be available. The fix is not available and sort by quantity is not working. The same can be checked on https://eavs-groupe.fr/smart-building/visioconference/cameras-ptz.html?product_list_order=quantity_and_stock_status&product_list_dir=desc

rahulanand77 commented 3 years ago

Hi @magento-engcom-team ,

The Magento version 2.4.3 is available in the market now. does this sort by quantity issue fixed in this version?

Thanks

rahulanand77 commented 3 years ago

Hi @magento-engcom-team,

Any update on the issue? we are still waiting for the update

Thanks

jornwildenbeest commented 3 years ago

Sorting by quantity still doesn't work with elastic search and magento 2.4.2, does it work with 2.4.3?

rahulanand77 commented 3 years ago

Hi @magento-engcom-team

still the issue is not fixed. Can you update on it? When can we expect it?

nd1996 commented 2 years ago

Any Updates on this issue?

Or anyone has any quick fix