Skip to content
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

Default AJAX Relevance search sort order is wrong #8711

Merged
merged 3 commits into from Mar 21, 2018

Conversation

@eternoendless
Copy link
Member

commented Jan 29, 2018

This PR is a cherry-pick from: #8458 and #8399

Questions Answers
Branch? develop
Description? default AJAX Product search Relevance sort order is wrong
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket?
How to test? search for "summer" in demo store. All products with the "summer" in the product name should appear at the first lines in the AJAX search results, but I see them at the 3rd and 4th positions (results shown immediately but in the ASC relevance order instead of DESC). This error is continuation of the pull request #8399. The issue was not fixed in full. as an addition to the fix in pull request #8399 I suggest the following change in the controllers/front/listing/SearchController.php: ->setSortOrder(new SortOrder('product', Tools::getProductsOrder('by', 4), Tools::getProductsOrder('way', 1))) instead of ->setSortOrder(new SortOrder('product', Tools::getProductsOrder('by'), Tools::getProductsOrder('way')))

This change is Reviewable

sbordun added 2 commits Nov 2, 2017
default AJAX Relevance search sort order is wrong
search for "summer" in demo store. All products with the "summer" in the product name should appear at the first lines in the AJAX search results, but I see them at the 3rd and 4th positions (results shown immediately but in the ASC relevance order instead of DESC). This error is continuation of the pull request #8399. The issue was not fixed in full. as an addition to the fix in pull request #8399 I suggest the following change in the controllers/front/listing/SearchController.php: ->setSortOrder(new SortOrder('product', Tools::getProductsOrder('by', 4), Tools::getProductsOrder('way', 1))) instead of ->setSortOrder(new SortOrder('product', Tools::getProductsOrder('by'), Tools::getProductsOrder('way')))

@eternoendless eternoendless added this to the 1.7.3.1 milestone Jan 29, 2018

@Quetzacoalt91

This comment has been minimized.

Copy link
Member

commented Jan 29, 2018

Requires #8399 to be cherry picked as well.

@eternoendless

This comment has been minimized.

Copy link
Member Author

commented Jan 29, 2018

Done!

@marionf marionf added QA ✔️ and removed waiting for QA labels Mar 21, 2018

@eternoendless eternoendless merged commit da6faab into PrestaShop:1.7.3.x Mar 21, 2018

1 of 2 checks passed

Codacy/PR Quality Review Codacy was unable to analyse your pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@eternoendless eternoendless deleted the eternoendless:fix-sort-order branch Mar 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.