fix(price): fix locale-based price selection and VAT note ordering#172
Open
stacelKonrad wants to merge 2 commits into
Open
fix(price): fix locale-based price selection and VAT note ordering#172stacelKonrad wants to merge 2 commits into
stacelKonrad wants to merge 2 commits into
Conversation
stacelKonrad
commented
May 28, 2026
Collaborator
- Add price field to ProductVariantApiResponseSchema so CT's pre-selected embedded price survives Zod parsing instead of being silently stripped
- Update price mapper to prefer variant.price over manual prices array filtering, ensuring CT's currency-matched price is used correctly per locale
- Append _locale param to BFF fetch URLs so Next.js data cache varies per locale (cache keys are URL-based, not header-based)
- Move VAT tax note before the main price in DecoratedPrice and remove CSS order overrides in favour of natural DOM order
- Add price field to ProductVariantApiResponseSchema so CT's pre-selected embedded price survives Zod parsing instead of being silently stripped - Update price mapper to prefer variant.price over manual prices array filtering, ensuring CT's currency-matched price is used correctly per locale - Append _locale param to BFF fetch URLs so Next.js data cache varies per locale (cache keys are URL-based, not header-based) - Move VAT tax note before the main price in DecoratedPrice and remove CSS order overrides in favour of natural DOM order
9 tasks
Arnimag
reviewed
May 28, 2026
| export const ProductVariantApiResponseSchema = z.object({ | ||
| id: z.number(), | ||
| sku: z.string().optional(), | ||
| price: PriceApiResponseSchema.optional(), |
Collaborator
There was a problem hiding this comment.
I don't see connection of this new "price" here? and still there are prices. Or we take both? Maybe prices should not be there at all
Collaborator
Author
There was a problem hiding this comment.
We are taking both. First pick is "price" if it is absent we are falling back to prices and old way of finding price(price.ts line 18).
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.