# How to access to Custom Article Attributes ?

**URL:** <https://forum.shopware.com/t/how-to-access-to-custom-article-attributes/64278>\
**Category:** Programmierung\
**Created:** [27. Januar 2020 um 14:13 UTC](https://forum.shopware.com/t/how-to-access-to-custom-article-attributes/64278 "2020-01-27T14:13:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YoUmars](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@YoUmars](https://forum.shopware.com/u/YoUmars)\
**Post date:** [27. Januar 2020 um 14:13 UTC](https://forum.shopware.com/t/how-to-access-to-custom-article-attributes/64278/1 "2020-01-27T14:13:07Z")

</div>

Hey,&nbsp;  
I created an attribute called exactid in my shopware (you can see it in the image above).&nbsp;  
I just want to access it in my code because I need to compare it with the id I am receivng from Exact Online.&nbsp;

So, My quesion is : How can I access this exactid attribute in my code ?

It should be something like :&nbsp;  
$exactId = getArticleAttribute($ordernumber);

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/3/35b750ed5cb4396bf19bdfdfe45ea7ebe228014e.png)

&nbsp;

Thank you.

---

<div class="post-metadata">

**Author:** ![ahmadsaad](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@ahmadsaad](https://forum.shopware.com/u/ahmadsaad)\
**Post date:** [28. Januar 2020 um 23:29 UTC](https://forum.shopware.com/t/how-to-access-to-custom-article-attributes/64278/2 "2020-01-28T23:29:22Z")

</div>

Hallo @YoUmars‍,

du kannst etwas wie so mahen:

```
$articleDetail = Shopware()->Models()->getRepository(\Shopware\Models\Article\Detail::class)->findOneBy(['number' => $orderNumber]);

// dann

$exactid = $articleDetail->getAttribute()->getExactid();

```

&nbsp;

probier es und gib mir Bescheid.

VG,

![image](https://enbit.de/img/logo.svg)

Tel.: +49 755&nbsp;- 183 990 00 | E-Mail: [info@enbit.de](mailto:info@enbit.de) | Web:&nbsp;[http://enbit.de/](http://enbit.de/)
