diff --git a/CHANGELOG.md b/CHANGELOG.md index 28d36e37e9..6cf5fade20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/core/modules/cart/store/actions.ts b/core/modules/cart/store/actions.ts index a67661b7c7..450663baf6 100644 --- a/core/modules/cart/store/actions.ts +++ b/core/modules/cart/store/actions.ts @@ -49,7 +49,7 @@ const actions: ActionTree = { 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) {