diff --git a/CHANGELOG.md b/CHANGELOG.md index 960963d78c..ebfa9ee68d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - All categories disappearing if you add the child category name to includeFields - @1070rik (#4015) - Fix overlapping text in PersonalDetails component - @jakubmakielkowski (#4024) - Redirect from checkout to home with a proper store code - @Fifciu +- Added back error notification when user selects invalid configuration - @1070rik (#4033) ### Changed / Improved - Optimized `translation.processor` to process only enabled locale CSV files - @pkarw (#3950) diff --git a/core/modules/catalog/events.ts b/core/modules/catalog/events.ts index 8eb005a116..97716f08b6 100644 --- a/core/modules/catalog/events.ts +++ b/core/modules/catalog/events.ts @@ -2,6 +2,7 @@ import EventBus from '@vue-storefront/core/compatibility/plugins/event-bus' import { PRODUCT_SET_CURRENT_CONFIGURATION, PRODUCT_SET_CURRENT } from './store/product/mutation-types' import omit from 'lodash-es/omit' import config from 'config' +import i18n from '@vue-storefront/core/i18n'; // Listeners moved from Product.js @@ -46,6 +47,14 @@ export const filterChangedProduct = async (filterOption, store, router) => { } ), { root: true }) } + + store.dispatch('notification/spawnNotification', { + type: 'warning', + message: i18n.t( + 'No such configuration for the product. Please do choose another combination of attributes.' + ), + action1: {label: i18n.t('OK')} + }) } }