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

[Bug] Basket State Not Refreshed Across Tabs After Order Placement #2157

Open
ksaleem25 opened this issue Dec 4, 2024 · 0 comments
Open

Comments

@ksaleem25
Copy link

Summary

When a user places an order in one tab, the basket state does not refresh in other open tabs. This leads to an error when the user attempts to add items to the basket from the outdated tab, as the basket has already been converted into an order.

Steps To Reproduce

  • Open PWA Kit Demo in one tab and navigate to a product detail page (PDP).
  • Add 1 item to the cart and leave this tab open on the PDP.
  • Open a second tab and visit PWA Kit Demo.
    Note: The cart already reflects the 1 item added in the first tab.
  • Place an order in the second tab to convert the basket into an order.
  • Return to the first tab, which is still on the PDP, and try adding another item to the cart.

Expected result

The basket state in the first tab should refresh automatically, reflecting the fact that the basket has been converted into an order. Adding a new item should create a new basket without any errors.

Actual result

An error occurs when attempting to add a new item to the cart from the first tab. The system displays a "something went wrong" message because the basket in that tab is outdated and already converted into an order.

System Information (as applicable)

Browser: Chrome
Node version: 20
pwa-kit version: 3.8
Desktop OS: mac
Mobile Device Info:

Additional information

Feel free to attach a screenshot.

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

No branches or pull requests

1 participant