You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
checkout preview fails with 'has no current price' for baskets with options #51
wolt checkout fails for any basket that has options:
basket cannot be used for checkout preview: basket item "<id>" option "<group>" value "<value>" has no current price
Cause
The basket response lists the chosen option values by id and count only; Wolt does not echo their price. BuildBasketUpsertItem requires a price for every option value and rejects the basket, so checkout preview is impossible whenever an option is selected, even though the catalog the CLI already loads contains those prices.
Fix
PR follows: fill missing option value prices from the catalog payloads checkoutpayload.Build already loads. A value with no price anywhere is still rejected, so no price is guessed.
Related
wolt cart add writes the line price as the item's base price, so paid option values are not reflected in the basket line price (subtotal in the preview excludes them). That is a separate question and not addressed here.
Follow-up on the "Related" note: the line price saved by wolt cart add has to include the selected paid option values, otherwise the cart and the checkout preview disagree.
Example (Make Your Own Pasta, base 12.00 EUR, chicken +4.50 EUR):
cart add stored only the dish's base price, so a basket with paid options under-reported what the dish costs, and the preview built from that line inherited the same number. #53 now saves base price + sum(option value price x count) for non-weighted lines (weighted lines keep their weight-based pricing). The checkout logic itself is unchanged: it already multiplies the saved line price by the count.
The existing TestCartAddKeepsFallbackCountsConfiguredTotalAndNestedPrices asserted the old behaviour and now expects the line price to include the options (500 base + 2 x 100 = 700).
Activity
zom-2018 commentedon Oct 12, 2026
Follow-up on the "Related" note: the line price saved by
wolt cart addhas to include the selected paid option values, otherwise the cart and the checkout preview disagree.Example (Make Your Own Pasta, base 12.00 EUR, chicken +4.50 EUR):
wolt cartsubtotalwolt checkoutitem subtotalcart addstored only the dish's base price, so a basket with paid options under-reported what the dish costs, and the preview built from that line inherited the same number. #53 now savesbase price + sum(option value price x count)for non-weighted lines (weighted lines keep their weight-based pricing). The checkout logic itself is unchanged: it already multiplies the saved line price by the count.The existing
TestCartAddKeepsFallbackCountsConfiguredTotalAndNestedPricesasserted the old behaviour and now expects the line price to include the options (500 base + 2 x 100 = 700).