-
Notifications
You must be signed in to change notification settings - Fork 340
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
List Preview and Sorting - Manual Sort via Drag and Drop Not Working #3440
Comments
Manual sorting works only when sorting is ... "position". |
Hi @Bashev, yes, I see in the code of vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Preview.php, but the values I have in the backend are not equal to "position" (I don't have the option with the value "position"). I have the following values in the backend: Here are the labels and corresponding values: Relevance - relevance_direction_desc Question: We want to have the possibility of manual sorting, regardless of the setting for position. What code changes are needed for this? I thought it should be working by default after installing your module? |
Hi @marijak, Could you specify from where came these values for
I'm pretty sure that it is not Magento's default staff behavior. Maybe it's because you use a third-party module, cause from out-the-box Magento has only three options in this dropdown:
Of course, it will work if you do not customize the default Magento stuff or install some 3rd party modules that can effect on this. What was the version of Magento before the update? BR, |
Hi, we are using a third-party extension for these additional options: |
Compatibility with third-party modules is outside the scope of our Open Source support policy provided here. There is not much we can do for your issue. You'll have to choose between our module and the second one or add customization by yourself (by coding). BR, |
After that, you select BR, |
First of all, you should remove then you need to install Elasticsuite: BR, |
do you have a demo version so i can see how it works on clean installation? |
I found this: https://demo.magento-elastic-suite.io/admin but could not find the credentials |
Hi @marijak this is obvious that it's not working anymore because of this : https://github.com/Smile-SA/elasticsuite/blob/2.11.x/src/module-elasticsuite-virtual-category/Model/Preview.php#L152 If the sort order is not "position", the drag and drop is disabled. In magesuite, the sort order can be either "position_direction_asc" or "position_direction_desc" : https://github.com/magesuite/sorting/blob/1.x/Model/Sorting/Options.php This is, imho, not needed anymore since we allow to manage the sort direction with ElasticSuite now. I would recommend to remove/disable the magesuite/sorting module because all it does (offering a way to control the position) is already existing in ElasticSuite now. Regards |
Hi, yes, thank you for your answer and support. I tried disabling it, but then other things stopped working. I cannot disable or uninstall only the magesuite/sorting module because it is part of a package: composer require creativestyle/magesuite. There are a lot of issues in our system after disabling it, so I am unable to check further. Anyway, if we want to control this only from Smile Elasticsearch, what changes are necessary? If we remove this code from Preview.php, we can see the control for manual sorting in the backend, but again, no changes are visible after performing actions on the frontend. I have also opened a ticket with the Magesuite support team, but I'm still waiting for a response. Do you know where the entire logic for the pre-sort is located and which files are responsible? Is it complex? This will help us understand what we need to do if we want to use this feature in the future. |
Imho you could just create your own https://github.com/magesuite/sorting/blob/1.x/etc/di.xml So your file should look like this :
|
Hi, thanks! After adding this code to the custom module, manual sorting is activated in the backend and works fine. However, on the frontend, the product order doesn't match the backend. I even switched to the Luma theme, set the default sort to "position," and reindexed, but the issue persists. n the end, we need both functionalities to work together. We’ve also contacted the MageSuite vendor creators, but we haven't received any response yet. |
In your capture it looks like it's applying "position DESC" if I trust the picture of the arrow, is it the case ? regards |
Nope, if the arrow is Up it means that Ascending Direction is set, and if the arrow is Down = Descending Direction. @marijak, are you sure that you Saved your category after manual sorting? Are there no other third-party extensions that could affect that? BR, |
OK for the arrow :) On top of that, maybe you can attach the content of the elasticsearch query which is generated on this page. You can see it on the system.log file after enabling the debug mode of Elasticsuite in Store>Configuration>ElasticSuite>Base Settings > Debug mode |
On my local environment, the debug log shows the following: |
I also thought that, regardless of ascending or descending order, the products set to manual sort should always appear in this order before all others in the collection. And yes, I am sure I saved the category. |
After our upgrade to Magento 2.4.6, this functionality stopped working. Previously, we were using version 2.10.15. Now, we have version 2.11.7.1, and I checked the latest version, which is 2.11.9.2 but issue is persisting here too tested locally.
Preconditions
Magento Version : 2.4.6-p7 (CE)
ElasticSuite Version : 2.11.7.1
Production
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: