Repository navigation
fix(cart): send item-level option group ids in basket options - #52
Merged
Merged
Conversation
Wolt keys a dish's options by an item-level "id" and references the shared option-library group through "option_id". buildItemPayloadFromAssortment replaced the item-level group with the library group, so the basket was written with library ids. The basket API accepts that, but the Wolt app only recognises item-level ids and silently shows the default choices instead. Rewrite the resolved group to carry the item-level id (keeping the library id as option_id) and let --option accept either id.
zom-2018
pushed a commit
to zom-2018/wolt-cli
that referenced
this pull request
Oct 12, 2026
mekedron
added a commit
to zom-2018/wolt-cli
that referenced
this pull request
Oct 12, 2026
…ion-value-prices Both branches add a test to internal/cli/cart_helpers_test.go at the same spot; the resolution keeps TestBuildBasketOptionsUsesItemLevelOptionGroupID from mekedron#52 and TestBasketOptionsTotalSumsPaidValues from mekedron#53. With this merge mekedron#53 applies cleanly on main once mekedron#52 is merged.
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.
Fixes #50
What
When a dish's option group has both an item-level
idand a libraryoption_id, send the item-level id in the basket (the library id is kept asoption_id).--optionkeeps accepting either id or the group name.Why
The basket API accepts library ids, but the Wolt app only recognises item-level ids and shows the default choices instead of the selection.
Test
TestBuildBasketOptionsUsesItemLevelOptionGroupID(fails before, passes after; covers selection by item-level id, library id and name).go build ./...,golangci-lint run,go test ./...,go test -raceon touched packages.