From e0359120a9050cc1b8cc9b115e60fb28de283b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Smyrek?= Date: Thu, 13 Feb 2020 08:57:50 +0100 Subject: [PATCH 1/3] Set store properties in reactive way --- core/modules/cart/store/mutations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/modules/cart/store/mutations.ts b/core/modules/cart/store/mutations.ts index eb016bb084..a0bfce3a1b 100644 --- a/core/modules/cart/store/mutations.ts +++ b/core/modules/cart/store/mutations.ts @@ -1,3 +1,4 @@ +import Vue from 'vue' import { MutationTree } from 'vuex' import * as types from './mutation-types' import CartState from '../types/CartState' @@ -56,7 +57,7 @@ const mutations: MutationTree = { let record = state.cartItems.find(p => (productsEquals(p, product) || (p.server_item_id && p.server_item_id === product.server_item_id))) if (record) { EventBus.$emit('cart-before-itemchanged', { item: record }) - record = Object.assign(record, product) + Object.entries(product).forEach(([key, value]) => Vue.set(record, key, value)) EventBus.$emit('cart-after-itemchanged', { item: record }) } }, From ce684124d19d921cc773ef3e0994dc000d4e012f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Smyrek?= Date: Thu, 13 Feb 2020 09:05:17 +0100 Subject: [PATCH 2/3] Changelog update --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62bbede03e..b622e065c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - add '1' as searched value for 'is_user_defined' and 'is_visible' (createAttributesListQuery) - @gibkigonzo (#4075) - Fix possibility to add same SKU with different custom options to the cart - @Michal-Dziedzinski (#3595) - Fix `calculateProductTax` to find matching tax rules from ES for current product - @DylannCordel (#4056) +- Set `totals` in products in cart always in reactive way - @psmyrek ## [1.11.1] - 2020.02.05 @@ -21,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed / Improved - Set cache tag when loading a category - @haelbichalex (#3940) -- In development build `webpack.config.js` in theme folder is now called without the `default` key +- In development build `webpack.config.js` in theme folder is now called without the `default` key - @psmyrek ### Fixed - Added Finnish translations - @mattiteraslahti and @alphpkeemik From ada09f7b0d1b25bc57d07f3f3afe2801b5191930 Mon Sep 17 00:00:00 2001 From: Patryk Andrzejewski Date: Thu, 13 Feb 2020 13:44:43 +0100 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b622e065c5..86a4b0550c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - add '1' as searched value for 'is_user_defined' and 'is_visible' (createAttributesListQuery) - @gibkigonzo (#4075) - Fix possibility to add same SKU with different custom options to the cart - @Michal-Dziedzinski (#3595) - Fix `calculateProductTax` to find matching tax rules from ES for current product - @DylannCordel (#4056) -- Set `totals` in products in cart always in reactive way - @psmyrek +- Set `totals` in products in cart always in reactive way - @psmyrek (#4079) ## [1.11.1] - 2020.02.05