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

Wrong grand total in cart if cart gets manipulated by different browser tabs. (same session, sync works only partial) #4733

Closed
2 of 5 tasks
NicolasHofmairT23 opened this issue Aug 12, 2020 · 2 comments
Assignees
Labels
bug Bug reports VSF1 Issues in regards to VSF1
Milestone

Comments

@NicolasHofmairT23
Copy link

Current behavior

Grand Total is wrong in browser tab 1 if user adds product in browser tab 2 (same session). The cart list of products gets synced but grand total not. (Side note: In https://vsf-next-demo.storefrontcloud.io/ the cart sync between browser tabs seems not to work at all)

Expected behavior

Micro Cart (including grand total) should be always in sync and same state in all browser tabs.

Steps to reproduce the issue

  1. Add product to cart. f.e. this one https://demo.vuestorefront.io/didi-sport-watch.html

  2. Open new browser tab, then open Micro cart. Everything looks fine.

  3. Change cart by changing quantity or adding another product from PDP in one of the browser tabs.

  4. Product list gets synced to the other browser tab session. Grand total stays old and is therefore wrong.

Repository

https://demo.vuestorefront.io/

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

@NicolasHofmairT23 NicolasHofmairT23 added the bug Bug reports label Aug 12, 2020
@gibkigonzo gibkigonzo added the VSF1 Issues in regards to VSF1 label Sep 1, 2020
@gibkigonzo gibkigonzo added this to the 1.12.3 milestone Sep 1, 2020
@andres-linares2211
Copy link

Hi all, I'm thinking in a solution for this and maybe the path we could take is to store the totals in localstorage.
It sounds a bit absurd as we are calculating the grand total when we are offline and therefore not even using localstorage. But with localstorage we can share the data among different tabs.

by the way, is not only the grand total but all the totals in the object platformTotalSegments that are not sync

@Fifciu Fifciu self-assigned this Dec 23, 2020
@Fifciu Fifciu mentioned this issue Dec 23, 2020
6 tasks
@Fifciu
Copy link
Collaborator

Fifciu commented Dec 28, 2020

Done. I've used localStorage as @andres-linares2211 suggested

@Fifciu Fifciu closed this as completed Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports VSF1 Issues in regards to VSF1
Projects
None yet
Development

No branches or pull requests

4 participants