<p>Even though the emailConfirmation was only one entry it was an array.</p>

<pre><code>{% set emailEntry = craft.entries.section('emailConfirmation').first() %}
</code></pre>

<p>setting up the entry to the html was similar to what I thought, but I didn't include the ".first()" so I wasn't getting what I expected.</p>

CC BY-SA 3.0
2018-03-23T20:46:16.750Z
2018-03-23T20:46:16.750Z
Fav
<p>I have a customer that wants to modify the order confirmation email.  I set up a new Entry for order confirmation to include a content block that goes to the email/email_confirmation file.</p>

<p>When I check in the browser or preview it works perfectly. When I actually send the email it doesn’t appear.</p>

<p>1) It works in the browser with:</p>

<pre><code>{% if entry.basicContentBlocks %}
// html code
{% endif %}
</code></pre>

<p>2) The Commerce plugin only seems to read from information in Commerce.  I tried to pull in the data:</p>

<pre><code>{% set emailEntry = craft.entries.section('emailConfirmation') %}
</code></pre>

<p>3) I tried making a global variable that used the email confirmation entry:</p>

<pre><code>{% set emailBlock = craft.globals.getSetByHandle('emailBlock') %}
</code></pre>

<p>It seems the email is loaded and sent before the entry information.</p>

<p>Is there a work around to allow customers to add information or pictures from the CMS?</p>

<p>Thank you for your help,</p>

CC BY-SA 3.0
2018-03-23T19:48:20.907Z
You can definitely load entries in a commerce email. Not really sure what errors you are getting?
Luke Holder
<plugin-craftcommerce>
add text or image to Craft Commerce confirmation email through the CMS
# add text or image to Craft Commerce confirmation email through the CMS

(Asked by: username_0 on 2018-03-23)

I have a customer that wants to modify the order confirmation email.  I set up a new Entry for order confirmation to include a content block that goes to the email/email_confirmation file.
When I check in the browser or preview it works perfectly. When I actually send the email it doesn’t appear.
1) It works in the browser with:
{% if entry.basicContentBlocks %}
// html code
{% endif %}

2) The Commerce plugin only seems to read from information in Commerce.  I tried to pull in the data:
{% set emailEntry = craft.entries.section('emailConfirmation') %}

3) I tried making a global variable that used the email confirmation entry:
{% set emailBlock = craft.globals.getSetByHandle('emailBlock') %}

It seems the email is loaded and sent before the entry information.
Is there a work around to allow customers to add information or pictures from the CMS?
Thank you for your help,

**Tags:** plugin-craftcommerce
> **Comments:**
> **username_1**: You can definitely load entries in a commerce email. Not really sure what errors you are getting?  

---

## 1 answers

### Answer by username_0 on 2018-03-23. Score: 1

Even though the emailConfirmation was only one entry it was an array.
{% set emailEntry = craft.entries.section('emailConfirmation').first() %}

setting up the entry to the html was similar to what I thought, but I didn't include the ".first()" so I wasn't getting what I expected.


---

