Fix itemsAdded to skip giftItems when creating the order items.#84
Draft
nicholas-maestrello wants to merge 3 commits intomasterfrom
Draft
Fix itemsAdded to skip giftItems when creating the order items.#84nicholas-maestrello wants to merge 3 commits intomasterfrom
itemsAdded to skip giftItems when creating the order items.#84nicholas-maestrello wants to merge 3 commits intomasterfrom
Conversation
|
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
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 problem is this solving?
The
useQuotemutation was failing with CHK0023 "Cantidad de item inválida" when trying to add items to cart. Gift items were being included in theorderItemsarray sent to the price update API, but they shouldn't have price/quantity values set manually since they're automatically managed by promotions.Also Add support for
unitMultiplierontype QuoteItemandQuoteItemInput.How to test it?
useQuotemutation[Workspace](Link goes here!)
Screenshots or example usage:
Before:
{"orderItems":[{"index":8},{"index":9}]} // ❌ Gift items with undefined price/quantityAfter:
// Gift items are filtered out from orderItems array ✅Screen.Recording.2026-02-20.at.15.43.16.mov
Screen.Recording.2026-02-20.at.16.55.29.mov
Screen.Recording.2026-02-20.at.16.58.04.mov
Screen.Recording.2026-02-20.at.17.03.06.mov
Describe alternatives you've considered, if any.
Could have set price/quantity to 0 for gifts, but filtering them out is cleaner since gift prices are controlled by promotions.
Related to / Depends on
Fixes the root cause identified in useQuote error logs (CHK0023).