# Property group - displayType erweitern

**URL:** <https://forum.shopware.com/t/property-group-displaytype-erweitern/65065>\
**Category:** Programmierung\
**Created:** [28. Februar 2020 um 05:50 UTC](https://forum.shopware.com/t/property-group-displaytype-erweitern/65065 "2020-02-28T05:50:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShapeAndShift](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@ShapeAndShift](https://forum.shopware.com/u/ShapeAndShift)\
**Post date:** [28. Februar 2020 um 05:50 UTC](https://forum.shopware.com/t/property-group-displaytype-erweitern/65065/1 "2020-02-28T05:50:55Z")

</div>

Guten Morgen,

ich möchte gerne die vorhandene Auswahl erweitern für die Ansicht der Eigenschaften. Aktuell gibt es text, bild & farbe.  
Ich möchte eine weitere eigene Eigenschaft per Plugin hinzufügen - Undzwar „größe“, was einfach mit der Frontend Darstellung zusammen hängt.

Ist das generell möglich? Ich finde aktuell leider keinen Ansatz.

---

<div class="post-metadata">

**Author:** ![AlexGalax](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/alexgalax/32/9925_2.png) [@AlexGalax](https://forum.shopware.com/u/AlexGalax)\
**Post date:** [28. Februar 2020 um 08:50 UTC](https://forum.shopware.com/t/property-group-displaytype-erweitern/65065/2 "2020-02-28T08:50:31Z")

</div>

Du kannst jeder propertyGroup customFields zuweisen, da könntest du das speichern. So speicher ich die bei mir:

```
$properties[] = [
    'id' => UuidMore::stringToHex($property['value']),
    'name' => $property['value'],
    'group' => [
      'id' => UuidMore::stringToHex($property['name']),
      'sortingType' => PropertySettings::getSortingType($property['name']),
      'displayType' => PropertySettings::getDisplayType($property['name']),
      'translations' => [
        'de-DE' => [
          'name' => $property['name']
        ]
      ],
      'customFields' => [
        'filterable' => PropertySettings::isFilterable($property['name'])
      ]
    ],
    'colorHexCode' => PropertySettings::getDisplayType($property['name'])=='color' ? PropertySettings::getHexColor($property['value']) : ''
];

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![ShapeAndShift](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@ShapeAndShift](https://forum.shopware.com/u/ShapeAndShift)\
**Post date:** [3. März 2020 um 08:53 UTC](https://forum.shopware.com/t/property-group-displaytype-erweitern/65065/3 "2020-03-03T08:53:20Z")

</div>

@AlexGalax‍ Danke dir. Werde ich einmal ausprobieren, ob ich das so hinbekomme&nbsp; ![Angry-Face](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/4d894c4dd47121f4ab1fba0317660ce0f6dbd4be.png "Angry-Face")

Kannst du mir noch sagen, wie du an die property im speziellen kommst? Die Frage welceh sich mir stellt: Reden wir von demselben? Ich sehe keine custom Fields.  
Also die properties welche man für Varianten verwendet. Ich möchte die Darstellung im Frontend anpassen - Dafür möchte ich gerne bei “Presentation” eine neue Option hinzufügen.

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/8/86e71ee839c4cbc1c9e86d19763b7d61eb4ff326.png)

---

<div class="post-metadata">

**Author:** ![AlexGalax](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/alexgalax/32/9925_2.png) [@AlexGalax](https://forum.shopware.com/u/AlexGalax)\
**Post date:** [9. März 2020 um 09:24 UTC](https://forum.shopware.com/t/property-group-displaytype-erweitern/65065/4 "2020-03-09T09:24:46Z")

</div>

Vermutlich kann man das Feld “Presentation” nicht einfach so um einen neuen Typen erweitern. Du kannst aber jeder ProperyGroup ein entsprechendes custom field mitgeben, in dem du diese Information speichern kannst. Wie man die im Admin Panel ausgeben kann weiß ich leider nicht.

---

<div class="post-metadata">

**Author:** ![ShapeAndShift](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@ShapeAndShift](https://forum.shopware.com/u/ShapeAndShift)\
**Post date:** [9. März 2020 um 09:57 UTC](https://forum.shopware.com/t/property-group-displaytype-erweitern/65065/5 "2020-03-09T09:57:21Z")

</div>

Hey Alex - Doch, dass kann man tatsächlich 🙂

Ich konnte es mittlerweile lösen. Du musst einfach nur die data method innerhalb der sw-property-detail-base component überschreiben
