Search code examples
shopware6shopware6-app

Use plugin configuration of subshops in Shopware 6


How can i get the config value of an sales-channel?

I am doing this:

$this->systemConfigService->get('pluginName.config.enable')

but this call returned only the All Sales Channels config value.

How can I get the config value of a particular sales channel?


Solution

  • The second argument of the get method takes the id of a sales_channel entity.

    public function get(string $key, ?string $salesChannelId = null)