# \[gelöst\] config.xml combo multiSelect

**URL:** <https://forum.shopware.com/t/gelost-config-xml-combo-multiselect/45517>\
**Category:** Programmierung\
**Created:** [2. Mai 2017 um 09:18 UTC](https://forum.shopware.com/t/gelost-config-xml-combo-multiselect/45517 "2017-05-02T09:18:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frk](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@frk](https://forum.shopware.com/u/frk)\
**Post date:** [2. Mai 2017 um 09:18 UTC](https://forum.shopware.com/t/gelost-config-xml-combo-multiselect/45517/1 "2017-05-02T09:18:59Z")

</div>

tach zusammen,

bin dabei per&nbsp;config.xml die plugin-config zu erstellen.  
siehe [hier](https://developers.shopware.com/developers-guide/plugin-system/#plugin-configuration-/-forms)

läuft und ist soweit kein problem.

jetzt möchte ich allerdings eine combobox mit mehrfachauswahl haben.

altes plugin wäre so:

```
$form->setElement('combo', 'TEST', array(
	'label'=>'multiSelect',
	'multiSelect' => true,
	'valueField' => 'id',
	'value' => array(2,3),
	'store' => 'base.CustomerGroup',
	'scope' => \Shopware\Models\Config\Element::SCOPE_SHOP)
);
// ...
$this->Config()->get('TEST')->toArray(); // z.b. [2,3]

```

leider gibte es wohl in der&nbsp;schema/config.xsd keine angabe zu&nbsp;multiSelect.

gibt es derzeit einen weg&nbsp;combo::multiSelect zu verwenden, oder hab ich da was übersehen?

---

<div class="post-metadata">

**Author:** ![frk](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@frk](https://forum.shopware.com/u/frk)\
**Post date:** [2. Mai 2017 um 09:48 UTC](https://forum.shopware.com/t/gelost-config-xml-combo-multiselect/45517/2 "2017-05-02T09:48:42Z")

</div>

ah, hab’s gefunden 🙂

```
        selectArray
        XML Store
        
            
                1
                DE 1
                EN 1
            
            
                TWO
                DE 2
                EN 2
            
            
                3
                Test
            
            
                4
                Test default
                Test
            
        
        
            true

```

siehe

```
        ...
        
            true

```

das geht&nbsp;so wie&nbsp;gewollt.

config abfrage sieht dann so aus:

```
public function getPluginConfig($name, $default=null) {
    $configReader = $this->container->get('shopware.plugin.config_reader');
    $pluginConfig = $configReader->getByPluginName('myPluginName');
    return isset($pluginConfig[$name]) ? $pluginConfig[$name] : $default;
}

$selectArray = $this->getPluginConfig('selectArray');

```

&nbsp;
