# getAttribute vom Hauptartikel

**URL:** <https://forum.shopware.com/t/getattribute-vom-hauptartikel/91752>\
**Category:** Programmierung\
**Created:** [1. Dezember 2021 um 14:37 UTC](https://forum.shopware.com/t/getattribute-vom-hauptartikel/91752 "2021-12-01T14:37:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pulveblei-shop](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@pulveblei-shop](https://forum.shopware.com/u/pulveblei-shop)\
**Post date:** [1. Dezember 2021 um 14:37 UTC](https://forum.shopware.com/t/getattribute-vom-hauptartikel/91752/1 "2021-12-01T14:37:15Z")

</div>

Hi,  
ich habe ein Plugin angepasst, was soweit funktioniert, würde aber gerne nur die Info des Freitextfeldes aus dem Hauptartikel entnehmen. Ist dies möglich?

```
        $articleAttr19 = '';
        if ($product !== null) {
            $attributes = $product->getAttribute();
            if (!empty($attributes)) {
           $articleAttr19 = $attributes->getAttr19();
            }
        }
```
