Files
Commerce/custom/email/order-notification-template.php
2025-02-19 16:48:48 +01:00

79 lines
3.1 KiB
PHP

<?php defined(security_key) or exit; ?>
<?=template_order_email_header()?>
<?php include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';?>
</tr>
<tr><td><br></td></tr>
<tr>
<td>
<?=$address_name?><br>
<?=$address_street?><br>
<?=$address_zip?>, <?=$address_city?><br>
<?=$address_country?>
</td>
</tr>
<tr><td><br></td></tr>
<tr>
<td>
<h1><?=$order_email_message_1?></h1>
<p><?=$order_email_message_2?></p></td>
<td>
<p>Order: <?=$order_id?></p>
<p>Date: <?php echo date("Y-m-d");?></p></td>
</tr>
</table>
</div>
</header>
<main>
<div class="content-wrapper">
<div class="table order-table">
<table>
<thead>
<tr>
<td><?=$tr_product ?? 'Product' ?></td>
<td><?=$tr_options ?? 'Options' ?></td>
<td><?=$tr_quantity ?? 'Quantity'?></td>
<td><?=$tr_price ?? 'Price' ?></td>
<td style="text-align:right;"><?=$tr_total?></td>
</tr>
</thead>
<tbody>
<?php foreach($products['products'] as $product): ?>
<tr>
<td><?=${$product['product_name']} ?? $product['product_name']?></td>
<td><?=implode(", ", $product['options'])?></td>
<td><?=$product['quantity']?></td>
<td><?=currency_code?><?=number_format($product['options_price'],2)?></td>
<td style="text-align:right;"><?=number_format($product['options_price'] * $product['quantity'],2)?></td>
</tr>
<?php endforeach; ?>
<tr>
<td colspan="5" class="item-list-end"></td>
</tr>
<tr>
<td colspan="4" class="subtotal"><?=$total_subtotal?></td>
<td class="num"><?=currency_code?><?=number_format($subtotal,2)?></td>
</tr>
<tr>
<td colspan="4" class="subtotal"><?=$total_discount?></td>
<td class="num"><?=currency_code?><?=number_format($discounttotal,2)?></td>
</tr>
<tr>
<td colspan="4" class="shipping"><?=$total_shipping?></td>
<td class="num"><?=currency_code?><?=number_format($shippingtotal,2)?></td>
</tr>
<tr>
<td colspan="4" class="tax"><?=$total_vat?></td>
<td class="num" style="border-bottom: 1px solid #0e0f10;"><?=currency_code?><?=number_format($taxtotal,2)?></td>
</tr>
<tr>
<td colspan="4" class="total"><?=$total_total?></td>
<td class="num"><?=currency_code?><?=number_format($total,2)?></td>
</tr>
</tbody>
</table>
</div>
</div>
<?=template_order_email_footer()?>