Repository navigation
fix(themes): send the shown sort option when the store default sort is disabled - #1044
Merged
sallainternalbot[bot] merged 3 commits intoSep 9, 2026
Conversation
When the merchant disables the default sort, the backend marks no option as selected and salla-products-list receives no sort-by, so the first request falls back to the store default instead of the enabled option. Render sort-by from the first enabled option when nothing is selected.
Lists with more than one option keep sending no sort, so the API default applies until the shopper picks a sort from the dropdown.
Contributor
Up to standards ✅🟢 Issues
|
eslamoo
marked this pull request as ready for review
September 9, 2026 13:35
Covers lists with more than one enabled option too, not just a single one. Stores whose first option is still ourSuggest send an unchanged request, and an explicit ?sort= keeps priority because the backend marks that option selected.
ashrafreda
approved these changes
Sep 9, 2026
ashrafreda
approved these changes
Sep 9, 2026
Collaborator
|
/merge |
Contributor
⏳ Enqueued for MergeYour pull request has been added to the merge queue. It will be merged automatically once it reaches the front of the queue ✅ 🔄 Queue Status🚦 QueueThe queue is empty. Good luck! 🧬 PR's Dependencies |
Contributor
🔄 Merge In ProgressThis pull request has reached the front of the queue and is now being processed for merge. |
sallainternalbot
Bot
deleted the
bugfix/RI-23763-sort-not-applied-when-single-option
branch
September 9, 2026 14:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behaviour? (You can also link to an open issue here)
is_selectedis derived only from the?sort=query param, so when a merchant disables the store's default sort (ourSuggest) no option is marked selected,salla-products-listreceives nosort-by, and the list loads in the API default order while the dropdown shows something else. With a single enabled option thechangeevent can never fire, so the mismatch is permanent.What is the new behaviour? (You can also link to the ticket here)
ourSuggest, the page renderssort-byfrom that option so the first request carries the sort the dropdown shows.sort-byourSuggest""sortparamourSuggestdisabled, 1 option&sort=<option>ourSuggestdisabled, 2+ options&sort=<first>?sort=""&sort=<from URL>""sortparamourSuggestchange at all. TheourSuggestexclusion is deliberate: the API default is byte-identical to an explicitsort=ourSuggest, so emitting it would add a query param to every store's first request for no behavioural gain.?sort=working. After a shopper picks a sort the theme adds?sort=viareplaceState; on reload the backend marks that option selected, the fallback stays empty, andcomponentWillLoad(this.sortBy || searchParams.get('sort')) reads the URL instead of being overridden by the attribute.Does this PR introduce a breaking change?
Screenshots (If appropriate)