Refactor email templates and add notification tasks
Moved email templates to a unified 'email' directory and added new base, header, and footer templates for emails. Implemented notification tasks in commerce for various order and refund events, and updated Carrier model to trigger notifications on shipping state changes.
This commit is contained in:
51
backend/templates/email/base.html
Normal file
51
backend/templates/email/base.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Email</title>
|
||||
</head>
|
||||
|
||||
<body style="margin:0; padding:0; background-color:#f2f2f2;">
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:#f2f2f2;">
|
||||
<tr>
|
||||
<td align="center" style="padding:20px 0;">
|
||||
|
||||
<!-- HLAVNÍ KONTEJNER -->
|
||||
<table width="600" cellpadding="0" cellspacing="0" border="0" style="background-color:#ffffff; border-collapse:collapse;">
|
||||
|
||||
<!-- HEADER -->
|
||||
<tr>
|
||||
<td style="padding:0; margin:0;">
|
||||
{% include 'email/components/header.html' %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<tr>
|
||||
<td style="padding:20px; font-family:Arial, Helvetica, sans-serif; font-size:14px; line-height:20px; color:#000000;">
|
||||
|
||||
{% if content_template %}
|
||||
{% include content_template %}
|
||||
{% else %}
|
||||
<p>missing content_template !!!</p>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- FOOTER -->
|
||||
<tr>
|
||||
<td style="padding:0; margin:0;">
|
||||
{% include 'email/components/footer.html' %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
8
backend/templates/email/components/footer.html
Normal file
8
backend/templates/email/components/footer.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:#eeeeee;">
|
||||
<tr>
|
||||
<td align="center" style="padding:15px; font-size:12px; color:#666666; font-family:Arial, Helvetica, sans-serif;">
|
||||
Tento e-mail byl odeslán automaticky.<br>
|
||||
© {{ site_name|default:"E-shop" }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
9
backend/templates/email/components/header.html
Normal file
9
backend/templates/email/components/header.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:#222;">
|
||||
<tr>
|
||||
<td align="center" style="padding:20px; color:#ffffff; font-family:Arial, Helvetica, sans-serif;">
|
||||
<h2 style="margin:0; font-size:22px;">
|
||||
{{ site_name|default:"E-shop" }}
|
||||
</h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
Reference in New Issue
Block a user