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

fix: products with attachments were being duplicated when increasing quantity in minicart #334

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

iago1501
Copy link
Contributor

@iago1501 iago1501 commented Jul 1, 2024

What problem is this solving?

This PR aims to fix (add a new param) to the KI: #337069

If a store uses the product-list component of Store Framework, used in the minicart, cart items may be duplicated when increasing the quantity of an item that has an attachment (itemAttachment).

This is because the default noSplitItem behavior of the API request that updates cart items is false.


With this PR, now, it's possible to add a prop splitItem in minicart-product-list, so, the customer will choose if they want or not to split the products in minicart.

How to test it?

Expected: Just increase the quantity of the product (A.K.A increase the SKU of a single product)
What was happening: Splitting the product into different products with only 1 quantity

Screenshots or example usage:

Before

Screen.Recording.2024-07-01.at.3.45.23.PM.mov

After

image

Describe alternatives you've considered, if any.

We keep the same default behavior (split = true), even though several clients were complaining about that.
The positive side effect is that this is not going to affect any live store
The negative side effect is that the client will have to change their theme in order to fix/change this behavior

Related to / Depends on

vtex-apps/checkout-resources#102
vtex-apps/product-list#159
https://github.com/vtex/order-items/pull/38

How does this PR make you feel? 🔗

Split king

@iago1501 iago1501 added the enhancement New feature or request label Jul 1, 2024
@iago1501 iago1501 self-assigned this Jul 1, 2024
@iago1501 iago1501 requested a review from a team as a code owner July 1, 2024 18:44
@iago1501 iago1501 requested review from eduardoformiga, lucasfp13 and lariciamota and removed request for a team July 1, 2024 18:44
Copy link
Contributor

vtex-io-ci-cd bot commented Jul 1, 2024

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:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Jul 1, 2024

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@EduardoRodriguesF
Copy link

Any chance it gets merged soon? We have a couple of stores with this issue.

@GusGuerra GusGuerra removed their request for review July 31, 2024 17:09
@iago1501 iago1501 merged commit 6b1256a into master Sep 5, 2024
7 checks passed
@iago1501 iago1501 deleted the add/splitItem branch September 5, 2024 19:02
Copy link
Contributor

vtex-io-ci-cd bot commented Sep 5, 2024

Your PR has been merged! App is being published. 🚀
Version 2.67.2 → 2.68.0

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy [email protected]

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants