# Admin Modul sw-promotion-v2-individual-codes-behavior in Shopware 6.5

**URL:** <https://forum.shopware.com/t/admin-modul-sw-promotion-v2-individual-codes-behavior-in-shopware-6-5/99213>\
**Category:** Programmierung\
**Tags:** administration\
**Created:** [4. April 2023 um 08:25 UTC](https://forum.shopware.com/t/admin-modul-sw-promotion-v2-individual-codes-behavior-in-shopware-6-5/99213 "2023-04-04T08:25:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liverson](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@Liverson](https://forum.shopware.com/u/Liverson)\
**Post date:** [4. April 2023 um 08:25 UTC](https://forum.shopware.com/t/admin-modul-sw-promotion-v2-individual-codes-behavior-in-shopware-6-5/99213/1 "2023-04-04T08:25:46Z")

</div>

Hallo,

in  
vendor/shopware/administration/Resources/app/administration/src/module/sw-promotion-v2/component/promotion-codes/sw-promotion-v2-individual-codes-behavior/index.js

sollte doch eigentlich in der Method „loadIndividualCodesGrid()“ die individuellen Promotion-Codes fürs Backend gezogen werden. Die Codes im Backend werden ja auch auch vom Twig-Template ausgeworfen.

Ich will mich hier reinhängen und der Criteria ein addAssociation hinzufügen, was mit Shopware 6.4 auch noch geklappt hat.

```auto
loadIndividualCodesGrid() {
            console.log(this.$refs.individualCodesGrid) // ist undefined
            console.log(this.$refs) // individualCodesGrid als Objekt sichtbar ???
            if (!this.$refs.individualCodesGrid) {
                return;
            }

            this.isGridLoading = true;
            this.promotion.individualCodes.criteria.addAssociation('myCustomRepo');
            this.promotion.individualCodes.criteria.addSorting(Criteria.naturalSorting('code'));

            this.$refs.individualCodesGrid.load().then(() => {
                this.isGridLoading = false;
            });
        }

```

In Shopware 6.5 ist aber this.$refs.individualCodesGrid immer „undefined“, so dass er die Funktion gar nicht weiter ausführt. Ich checks jetzt nicht mehr, wo er dann die individuellen Codes für die Backend-view zieht?

Kann mir da jemand auf die Sprünge helfen?

LG Oliver

---

<div class="post-metadata">

**Author:** ![Liverson](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@Liverson](https://forum.shopware.com/u/Liverson)\
**Post date:** [7. April 2023 um 06:47 UTC](https://forum.shopware.com/t/admin-modul-sw-promotion-v2-individual-codes-behavior-in-shopware-6-5/99213/2 "2023-04-07T06:47:13Z")

</div>

kann von Shopware hier auch niemand was dazu beitragen? In 6.4 ging das ja auch noch, verstehe dann nicht wo dann die individuellen Codes gezogen werden sollen, wenn nicht von hier
