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 cartID entity = null error #2822

Closed
wants to merge 3 commits into from
Closed

FIX cartID entity = null error #2822

wants to merge 3 commits into from

Conversation

michhy
Copy link

@michhy michhy commented Apr 26, 2019

Related issues

closes #2592

Short description and why it's useful

The clear cart function on microcart creates cartID token error without the added line.

Screenshots of visual changes before/after (if there are any)

Which environment this relates to

Check your case. In case of any doubts please read about Release Cycle

  • Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
  • RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
  • Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility and no breaking changes)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change

Contribution and currently important rules acceptance

@michhy
Copy link
Author

michhy commented Apr 26, 2019

Please ignore the first two commits and take the last one.
Sorry this is really my first time, hopefully this is finally helping.

@pkarw pkarw requested a review from patzick April 26, 2019 18:33
@pkarw
Copy link
Collaborator

pkarw commented Apr 27, 2019

@michhy please let me know if You have config.orders.directBackendSync set to true?

@michhy
Copy link
Author

michhy commented Apr 27, 2019

@pkarw , the whole function should be like this:
clear (context) { context.commit(types.CART_LOAD_CART, []) context.commit(types.CART_LOAD_CART_SERVER_TOKEN, null) if (rootStore.state.config.cart.synchronize && !rootStore.state.config.orders.directBackendSync) { rootStore.dispatch('cart/serverCreate', { guestCart: !rootStore.state.config.orders.directBackendSync }, {root: true}) } else { rootStore.dispatch('cart/serverCreate', { guestCart: true }, { root: true }) } },

@pkarw
Copy link
Collaborator

pkarw commented Apr 27, 2019

I'm on it. It looks like this is not the right solution, the issue is related to async network calls probably. I'm on it

@pkarw pkarw closed this Apr 27, 2019
@michhy
Copy link
Author

michhy commented Apr 30, 2019

amazing! thank you!

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

Successfully merging this pull request may close these issues.

Cart token is not refreshed even when invalid
2 participants