Customized Module for Email

Hello Guys. How are you doing?

I need some help with a customized module for email.

My idea is to create kind of a table that I can add rows with Name, Price, Variation Price Color (red ou green) and Variation.

I’ve tried the follow code, but i cant succeed.

<table style=“width: 100%; border-collapse: collapse;”>
<tr>
<th style=“border: 1px solid #ccc; padding: 8px;”>Commodity</th>
<th style=“border: 1px solid #ccc; padding: 8px;”>Preço</th>
<th style=“border: 1px solid #ccc; padding: 8px;”>Variação</th>
</tr>
{% for commodity in commodities %}
<tr>
<td style=“border: 1px solid #ccc; padding: 8px;”>{{ commodity.name_commodities }}</td>
<td style=“border: 1px solid #ccc; padding: 8px;”>{{ commodity.price }}</td>
<td style=“border: 1px solid #ccc; padding: 8px;”>{{ commodity.variation }}</td>
</tr>
{% endfor %}
</table>

Hi @LRaganicchi,

Thank you for reaching out to the Community!

I wanted to take a step back first and share @KTownsend’s solution to this Community question where she mentions a couple of other ways of including a table in your email other than using a custom module.

As for the custom module way: @Alejandro_ shared some code in his solution here which might help!

@KTownsend & @Alejandro_ if you have some additional advice for @LRaganicchi that you could share that’d be amazing! :star: Thank you! :slightly_smiling_face:

Cheers
Mia, Community Team