# Creating a select box with order statuses in the plugin admin panel

**URL:** <https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606>\
**Category:** Shopware 6 (English)\
**Created:** [13. Juli 2025 um 09:19 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606 "2025-07-13T09:19:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![serhii.shylo](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@serhii.shylo](https://forum.shopware.com/u/serhii.shylo)\
**Post date:** [13. Juli 2025 um 09:19 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606/1 "2025-07-13T09:19:37Z")

</div>

Hi.

I am developing a payment plugin for Shopware 6.7. Please tell me how to get a select box on the plugin settings page in the admin panel that will only contain order statuses.

Currently, I can get a select box with all system statuses, but that’s not what I need.

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [13. Juli 2025 um 09:20 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606/2 "2025-07-13T09:20:57Z")

</div>

There are three different kind of states. Filter for technical\_name: order\_transaction.state

---

<div class="post-metadata">

**Author:** ![serhii.shylo](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@serhii.shylo](https://forum.shopware.com/u/serhii.shylo)\
**Post date:** [13. Juli 2025 um 09:56 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606/3 "2025-07-13T09:56:40Z")

</div>

I think you mean other statuses.  
Here is a fragment of my plugin file from config.xml:

```auto
<component name="procardpay-order-state-select">
            <name>defaultOrderStatus</name>
            <label>Default Order Status (Approved)</label>
            <help-text>Order status in Shopware after successful payment via ProcardPay.</help-text>
            <multi>false</multi>
            <required>true</required>
            <entity>state_machine_state</entity>
            <value-field>id</value-field>
            <label-field>translated.name</label-field>
        </component>

```

I also made a custom component that provides values for this select.

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [13. Juli 2025 um 10:10 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606/4 "2025-07-13T10:10:24Z")

</div>

> [@serhii.shylo](#):
>
> I think you mean other statuses.

You are right. I read about the payment plugin, so I jumped to an early conclusion.

state\_machine\_state contains all states, you have to set a filter when requesting the entity.

---

<div class="post-metadata">

**Author:** ![serhii.shylo](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@serhii.shylo](https://forum.shopware.com/u/serhii.shylo)\
**Post date:** [13. Juli 2025 um 10:15 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606/5 "2025-07-13T10:15:08Z")

</div>

I understand that, I’ve already figured it out. But I’m interested in the implementation of this filter. Because all my attempts to do it have been unsuccessful.

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [13. Juli 2025 um 10:27 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606/6 "2025-07-13T10:27:56Z")

</div>

Never done that, but AI tells me ti add within the component.

```auto
<criteria>
        <filter>
            <type>equals</type>
            <field>stateMachine.technicalName</field>
            <value>order.state</value>
        </filter>
    </criteria>

```

---

<div class="post-metadata">

**Author:** ![serhii.shylo](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@serhii.shylo](https://forum.shopware.com/u/serhii.shylo)\
**Post date:** [13. Juli 2025 um 10:46 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606/7 "2025-07-13T10:46:44Z")

</div>

```auto
<component name="sw-entity-single-select">
            <name>defaultOrderStatus</name>
            <label lang="en-GB">Default Order Status (Approved)</label>
            <label lang="uk-UA">Статус замовлення за замовчуванням (Схвалено)</label>
            <label lang="ru-RU">Статус заказа по умолчанию (Одобрено)</label>
            <help-text lang="en-GB">Order status in Shopware after successful payment via ProcardPay.</help-text>
            <help-text lang="uk-UA">Статус замовлення в Shopware після успішної оплати через ProcardPay.</help-text>
            <help-text lang="ru-RU">Статус заказа в Shopware после успешной оплаты через ProcardPay.</help-text>
            <multi>false</multi>
            <required>true</required>
            <entity>state_machine_state</entity>
            <criteria>
                <filter>
                    <type>equals</type>
                    <field>stateMachine.technicalName</field>
                    <value>order.state</value>
                </filter>
            </criteria>
            <valueProperty>id</valueProperty>
            <labelProperty>translated.name</labelProperty>
        </component>

```

This option does not work. Error in the browser console:

app.js?1752403431:86 An error was captured in current module: TypeError: this.criteria.setPage is not a function

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [13. Juli 2025 um 11:23 UTC](https://forum.shopware.com/t/creating-a-select-box-with-order-statuses-in-the-plugin-admin-panel/107606/8 "2025-07-13T11:23:44Z")

</div>

This is from 2001, but then it was explained that it is not possible. You need your own component.

> [@Criteria in sw-entity-single-select component in der PluginKonfiguration setzen](https://forum.shopware.com/t/criteria-in-sw-entity-single-select-component-in-der-pluginkonfiguration-setzen/64873/11):
>
> Hi Oli, die einzige mir bekannte Lösung ist eine eigene Componente für die Config zu schreiben. Hier ein Beispiel. custom/plugins/OwnPlugin/src/Resources/app/administration/src/component/entity/own-state-select/index.js const { Component } = Shopware; const { Criteria } = Shopware.Data; Component.extend('own-state-select', 'sw-entity-single-select', { props: { criteria: { type: Object, required: false, default() { const criteria…

[https://stackoverflow.com/questions/74400367/how-can-we-filter-the-options-of-an-entity-select-component-in-the-app-config](https://stackoverflow.com/questions/74400367/how-can-we-filter-the-options-of-an-entity-select-component-in-the-app-config)
