# Order Attributes Null even though data is present in database?

**URL:** <https://forum.shopware.com/t/order-attributes-null-even-though-data-is-present-in-database/59102>\
**Category:** Programmierung\
**Created:** [16. April 2019 um 08:46 UTC](https://forum.shopware.com/t/order-attributes-null-even-though-data-is-present-in-database/59102 "2019-04-16T08:46:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SalikJamal](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SalikJamal](https://forum.shopware.com/u/SalikJamal)\
**Post date:** [16. April 2019 um 08:46 UTC](https://forum.shopware.com/t/order-attributes-null-even-though-data-is-present-in-database/59102/1 "2019-04-16T08:46:58Z")

</div>

I want to edit my email template of order confirmation from the backend and use the given variable&nbsp;from the variables column. But&nbsp;it shows the value of every order attribute null in the backend. The record present in the variable column is of the most recent order, and I have some records of my custom attribute column named **“order\_comments”&nbsp;** in the **“s\_order\_attributes”** table. I want to use the **“{$attributes.order\_comments}”&nbsp;** variable but since it’s showing it’s value null I cannot see any data in it.

**Below I have attached images.**

**The image&nbsp;of the backend email template.**

[**http://prntscr.com/ncl4ps**](http://prntscr.com/ncl4ps)

&nbsp;

**Image of the database custom attribute field.**

**[http://prntscr.com/ncl7c0](http://prntscr.com/ncl7c0)**

&nbsp;

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [16. April 2019 um 12:43 UTC](https://forum.shopware.com/t/order-attributes-null-even-though-data-is-present-in-database/59102/2 "2019-04-16T12:43:26Z")

</div>

Have you already created an order after creating the attribute? The mail context on the right&nbsp;is only updated when you sent the mail via the process it is normally send with. In your case an order in the frontend.

---

<div class="post-metadata">

**Author:** ![SalikJamal](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@SalikJamal](https://forum.shopware.com/u/SalikJamal)\
**Post date:** [16. April 2019 um 13:01 UTC](https://forum.shopware.com/t/order-attributes-null-even-though-data-is-present-in-database/59102/3 "2019-04-16T13:01:00Z")

</div>

> [@Moritz Naczenski schrieb:](https://forum.shopware.com/profile/14574/Moritz%20Naczenski "Moritz%20Naczenski")
> 
> Have you already created an order after creating the attribute? The mail context on the right&nbsp;is only updated when you sent the mail via the process it is normally send with. In your case an order in the frontend.
> 
> Yes I have made an order and also filled the order\_comment field. As you can it in the image I have provided of the database. I then refreshed it and again checked it
> 
> &nbsp;

---

<div class="post-metadata">

**Author:** ![fliegfix\_block](https://avatars.discourse-cdn.com/v4/letter/f/7cd45c/32.png) [@fliegfix\_block](https://forum.shopware.com/u/fliegfix_block)\
**Post date:** [7. Juli 2020 um 20:18 UTC](https://forum.shopware.com/t/order-attributes-null-even-though-data-is-present-in-database/59102/4 "2020-07-07T20:18:26Z")

</div>

I know this thread is a bit old but I am facing the same issue but with s\_order\_details\_attributes.attribute1 - 6 fields. The variable examples on the right show “null”, the preview shows nothing and when placing a new order, the data is also not populated. It is definitly in the database.

---

<div class="post-metadata">

**Author:** ![KatjaP](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@KatjaP](https://forum.shopware.com/u/KatjaP)\
**Post date:** [28. Juli 2022 um 11:49 UTC](https://forum.shopware.com/t/order-attributes-null-even-though-data-is-present-in-database/59102/5 "2022-07-28T11:49:17Z")

</div>

Hello everyone,

is there a solution to this?  
We have the same problem.

Thank you!
