File: /home/artinside/www/finance/shared/views/email/order.php
<?php $v->layout("_notifications", ["title" => "Sua compra em ".CONF_SITE_NAME]); ?>
<table class="row" align="center" bgcolor="<?= status($order->status)->color ?>" cellpadding="0" cellspacing="0">
<tr>
<td class="spacer" height="40" style="line-height: 40px;"> </td>
</tr>
<tr valign="top" style="vertical-align: top;">
<th class="column mobile-12" width="640" style="padding-left: 30px; padding-right: 30px; color: #FFF; font-weight: 400; text-align: left;">
<div style="font-size: 28px; font-weight: 700; line-height: 30px; margin-bottom: 30px; text-align: center"><?= status($order->status)->text ?></div>
</th>
</tr>
</table>
<table class="row" align="center" bgcolor="#F4F4F4" cellpadding="0" cellspacing="0">
<tr>
<td class="spacer" height="40" style="line-height: 40px;"> </td>
</tr>
<tr valign="top" style="vertical-align: top;">
<th class="column mobile-12" width="640" style="padding-left: 30px; padding-right: 30px; color: #232323; font-weight: 400; text-align: left;">
<div style="font-size: 28px; font-weight: 700; line-height: 30px; margin-bottom: 30px;">Olá <?= $user->data()->type == "individual" ? $user->fullName() : $user->data()->first_name ?>,</div>
<div style="color: #666666; font-size: 18px;">Obrigado pela sua compra na <?= CONF_SITE_NAME ?>.<br>Qualquer dúvida acesse nosso site e na sua área de usuário confira o andamento do seu pedido</div>
</th>
</tr>
</table>
<table class="row" align="center" bgcolor="#F4F4F4" cellpadding="0" cellspacing="0">
<tr>
<td class="spacer" colspan="2" height="40" style="line-height: 40px;"> </td>
</tr>
<tr valign="top" style="vertical-align: top;">
<th class="column mobile-12 mobile-padding-bottom" width="310" style="padding-left: 30px; padding-right: 10px; color: #232323; font-weight: 400; text-align: left;">
<div style="font-size: 17px; margin-bottom: 30px;">Faturado para:</div>
<div style="color: #666666; font-size: 15px;">
<?= $user->data()->type == "individual" ? $user->fullName() : $user->data()->first_name ?>
<br><?= $order->street ?>
<?= $order->complement ? "<br>".$order->complement : "" ?>
<br><?= $order->city ?>
<br>Cep: <?= $order->zipcode ?>
</div>
</th>
<th class="column mobile-12" width="310" style="padding-left: 10px; padding-right: 30px; color: #232323; font-weight: 400; text-align: left;">
<div style="font-size: 17px; margin-bottom: 30px;">Detalhes do Pedido:</div>
<div style="color: #666666; font-size: 15px;">
<div><strong>Número:</strong> [#<?= sprintf("%06d", $order->id)?>]</div>
<div><strong>Data:</strong> <?= date_fmt($order->created_at)?></div>
<div><strong>Pagamento:</strong> <?= $order->payment_type?> em <?= $order->installments ?>X</div>
<div><strong>Entrega:</strong> <?= $order->shipment_type?> </div>
</div>
</th>
</tr>
<tr>
<td class="spacer" colspan="2" height="40" style="line-height: 40px;"> </td>
</tr>
</table>
<table class="row" align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">
<tr valign="top" style="vertical-align: top;">
<th class="column mobile-12" width="640" style="padding-left: 30px; padding-right: 30px; color: #232323; text-align: left;">
<div class="spacer" style="line-height: 40px;"> </div>
<div style="font-size: 22px; line-height: 30px;">Sua Compra:</div>
<div class="spacer" style="line-height: 40px;"> </div>
</th>
</tr>
</table>
<?php foreach ($itens as $c):?>
<table class="row" align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">
<tr>
<th class="column mobile-12 mobile-padding-bottom-mini" width="90" style="padding-left: 30px; padding-right: 10px; text-align: left;">
<div>
<img src="<?= image($c->cover, 90, 90 )?>" alt="Product 1" width="90" style="border: 0; width: 100%; max-width: 90px;">
</div>
</th>
<th class="column mobile-8" width="345" style="padding-left: 30px; padding-right: 10px; color: #666666; font-weight: 400; text-align: left;">
<div style="color: #232323; font-size: 16px; font-weight: 700; margin-bottom: 10px;">
<?= $c->name ?>
<?php if($c->firstVariation != "no-variations" AND $c->firstVariation != ""):?>
<br>
<span class="small">[<?= str_replace("_", ",", $c->firstVariation) ?>][<?= str_replace(".", ",", $c->multiplier) ?> metros]</span>
<?php endif; ?>
</div>
<div><b>R$ <?= preco_real($c->price)?></b> | Quantidade: <?= $c->quantity ?></div>
</th>
<th class="column mobile-4" width="145" style="padding-left: 10px; padding-right: 30px; color: #666666; font-size: 14px; text-align: right;">
<div></div>
</th>
</tr>
<tr class="divider">
<th colspan="3" height="80" style="padding: 0 30px;">
<div style="border-top: 1px solid #EEEEEE; line-height: 0;"> </div>
</th>
</tr>
</table>
<?php endforeach; ?>
<table class="row" align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">
<tr>
<th class="column mobile-6" width="310" style="padding-left: 30px; padding-right: 10px; color: #999999; font-weight: 400; text-align: left;">
<div style="font-size: 14px;">Sub-total</div>
</th>
<th class="column mobile-6" width="310" style="padding-left: 10px; padding-right: 30px; color: #666666; text-align: right;">
<div style="font-size: 14px; font-weight: 700;">R$ <?= preco_real($order->products_price)?></div>
</th>
</tr>
<tr>
<td class="spacer" colspan="2" height="10" style="line-height: 10px; height: 10px;"> </td>
</tr>
<tr>
<th class="column mobile-6" width="310" style="padding-left: 30px; padding-right: 10px; color: #999999; font-weight: 400; text-align: left;">
<div style="font-size: 14px;">Frete</div>
</th>
<th class="column mobile-6" width="310" style="padding-left: 10px; padding-right: 30px; color: #666666; text-align: right;">
<div style="font-size: 14px; font-weight: 700;">R$ <?= preco_real($order->shipment_price)?></div>
</th>
</tr>
<tr>
<th class="column mobile-6" width="310" style="padding-left: 30px; padding-right: 10px; color: #999999; font-weight: 400; text-align: left;">
<div style="font-size: 14px;">Descontos</div>
</th>
<th class="column mobile-6" width="310" style="padding-left: 10px; padding-right: 30px; color: #666666; text-align: right;">
<div style="font-size: 14px; font-weight: 700;">R$ <?= preco_real($order->discount + $order->discount_payment)?></div>
</th>
</tr>
<tr class="divider">
<th colspan="2" height="40" style="padding: 0 30px;">
<div style="border-top: 1px solid #EEEEEE; line-height: 0;"> </div>
</th>
</tr>
<tr>
<th class="column mobile-6" width="310" style="padding-left: 30px; padding-right: 10px; color: #999999; font-weight: 400; text-align: left;">
<div style="font-size: 14px;">TOTAL</div>
</th>
<th class="column mobile-6" width="310" style="padding-left: 10px; padding-right: 30px; color: #666666; text-align: right;">
<div style="font-size: 14px; font-weight: 700;">R$ <?= preco_real($order->products_price + $order->shipment_price - $order->discount - $order->discount_payment)?></div>
</th>
</tr>
</table>