Skip to content

Commit

Permalink
Merge pull request vuestorefront#2302 from grimasod/bugfix/new-cart-a…
Browse files Browse the repository at this point in the history
…fter-checkout

Fix vuestorefront#2283 - Create new cart after checkout
  • Loading branch information
pkarw committed Jan 30, 2019
2 parents bb916cb + 4aa677c commit 6bfe3f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support regional characters in urls
- `store/lib/search` has been moved to `core/lib/search` (#2225)
- `store/lib/multistore` has been moved to `core/lib/multistore` (#2224)
- After checkout create logged-in cart for logged-in users if using order Direct Backend Sync - @grimasod (#2302)

## [1.7.2] - 2019.01.28
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion core/modules/cart/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const actions: ActionTree<CartState, RootState> = {
context.commit(types.CART_LOAD_CART, [])
context.commit(types.CART_LOAD_CART_SERVER_TOKEN, null)
if (rootStore.state.config.cart.synchronize) {
rootStore.dispatch('cart/serverCreate', { guestCart: true }, {root: true}) // guest cart because when the order hasn't been passed to magento yet it will repopulate your cart
rootStore.dispatch('cart/serverCreate', { guestCart: !rootStore.state.config.orders.directBackendSync }, {root: true}) // guest cart when not using directBackendSync because when the order hasn't been passed to magento yet it will repopulate your cart
}
},
save (context) {
Expand Down

0 comments on commit 6bfe3f1

Please sign in to comment.