Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shouldSplitItem not working on ValidateCartMutation with attachment #2426

Open
raphaelsantos-dev opened this issue Aug 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@raphaelsantos-dev
Copy link

Describe the bug
I have the cart configured to not split products on faststore.config.js
cart: {
id: "",
items: [],
messages: [],
shouldSplitItem: false,
},

When I change the quantity a product with a attachment on miniCart, the product is splited.
This quantity is changed by cartStore.updateItemQuantit from sdk

import { cartStore } from 'src/sdk/cart'
cartStore.updateItemQuantity(item.id, quantity)

This split create a bug scenario, the request sent a quantity 2 on ValidateCartMutation, but response has a quantity 4
image
image

.har file compressed to validation
sfj-51cd395--farewayqa.preview.vtex.app_Archive [24-08-26 13-37-54].har.zip

Expected behavior
Product with attachment not split on orderForm when quantity is changed

Steps to reproduce

  • Add the product with attachment to cart
  • Change the quantity to 3 (product is splited)
  • Change the attachment of this product (this action join the splitted product)
  • Change the quantity to 4 (the payload has qty 4, but response has 6)

Workspace
https://sfj-51cd395--farewayqa.preview.vtex.app

@raphaelsantos-dev raphaelsantos-dev added the bug Something isn't working label Aug 26, 2024
@dseynhae

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@dseynhae @raphaelsantos-dev and others