# config.xml element store speichert displayField als valueField

**URL:** https://forum.shopware.com/t/config-xml-element-store-speichert-displayfield-als-valuefield/57304
**Category:** Programmierung
**Created:** [6. Januar 2019 um 03:31 UTC](https://forum.shopware.com/t/config-xml-element-store-speichert-displayfield-als-valuefield/57304 "2019-01-06T03:31:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Apostolos](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Apostolos](https://forum.shopware.com/u/Apostolos)
#### Post date: [6. Januar 2019 um 03:31 UTC](https://forum.shopware.com/t/config-xml-element-store-speichert-displayfield-als-valuefield/57304/1 "2019-01-06T03:31:59Z")

</div>

```
 Ich entwickle ein neues plugin und habe in config.xml ein Select-Tag, in dem die aktiven Zahlungsarten gesammelt&nbsp;werden. Im Shopware Plugin-Manager bearbeite ich das Plugin und wähle in seiner Konfiguration eine Zahlung aus und klicke dann auf Speichern. In Datebank ist gespeichert das displayField(z.B. Nachname) als das valueField(z.B. 3). Wie kann ich die ID der Zahlung speichern als den Text davon? Shopware 5.4

    payment
    Wählen Sie Ihr Zahlungsart aus:
    3
    
    
    
        id
        name

```

&nbsp;

```
public function getConfigPaymentsAction()
{
    $payments = Shopware()->Models()->getRepository(\Shopware\Models\Payment\Payment::class)
        ->getActivePaymentsQuery()->getArrayResult();

    $data = [];

    foreach ($payments as $payment) {
        $data[] = [
            'id' => $payment['id'],
            'name' => $payment['description']
        ];
    }

    $this->View()->assign([
        'data' => $data,
        'total' => count($data)
    ]);
}

```

&nbsp;

---

<div class="post-metadata">

### Author: ![Apostolos](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Apostolos](https://forum.shopware.com/u/Apostolos)
#### Post date: [6. Januar 2019 um 12:29 UTC](https://forum.shopware.com/t/config-xml-element-store-speichert-displayfield-als-valuefield/57304/2 "2019-01-06T12:29:48Z")

</div>

Ich habe es gelöst

```
Shopware.apps.Base.store.Payment

    id
    description

```

&nbsp;
