[Vuejs]-Retrieve config value from sales channel in plugin settings

1👍

You may want to inject systemConfigApiService and use it to retrieve the config values. getValues takes a second argument for the sales channel id.

Component.register('my-component', {
    inject: ['systemConfigApiService'],
    methods: {
        getConfig(salesChannelId) {
            const values =  this.systemConfigApiService
                .getValues('MyPlugin.config', salesChannelId);

            return values.myKey;
        },
    },
}

Leave a comment