Commits

Kai Diefenbach committed 9ba6c37

Added templates for order_sent_mail

  • Participants
  • Parent commits fc589b5

Comments (0)

Files changed (2)

File lfstheme/templates/lfs/mail/order_sent_mail.html

+{% load i18n %}
+{% load lfs_tags %}
+<html>
+    <head>
+        <style type="text/css">
+            table.orders,
+            table.order-general,
+            table.order-items,
+            table.order-addresses,
+            table.order-message,
+            table.manage-overview,
+            .selected-accessories table,
+            .selectable-products table {
+                width: 100%;
+                border-collapse: collapse;
+            }
+            th {
+                text-align:left;
+                background-color: #eee;
+            }
+            td {
+                vertical-align: top;
+                text-align: left;
+            }
+            .number {
+                text-align:right;
+            }
+            .total {
+                font-weight:bold;
+            }
+
+            .tax {
+                font-size: 90%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>{% trans "Your order has been sent" %}</p>
+        <table class="order-general">
+            <tr>
+                <th colspan="4">
+                    {% trans 'General' %}
+                </th>
+            </tr>
+            <tr>
+                <td class="label">
+                    {% trans 'Customer name' %}:
+                </td>
+                <td>
+                    {{ order.customer_firstname }} {{ order.customer_lastname }}
+                </td>
+                <td class="label">
+                    {% trans 'Date' %}:
+                </td>
+                <td>
+                    {{ order.created|date:_("DATETIME_FORMAT") }}
+                </td>
+            </tr>
+            <tr>
+                <td class="label">
+                    {% trans 'E-mail' %}:
+                </td>
+                <td>
+                    {{ order.customer_email }}
+                </td>
+                <td class="label">
+                    {% trans 'State' %}:
+                </td>
+                <td>
+                    {{ order.get_state_display }}
+                </td>
+            </tr>
+            <tr>
+                <td class="label">
+                    {% trans 'Phone' %}:
+                </td>
+                <td>
+                    {{ order.shipping_phone }}
+                </td>
+                <td class="label">
+                    {% trans 'Total' %}:
+                </td>
+                <td>
+                    {{ order.price|currency }}
+                </td>
+            </tr>
+
+        </table>
+        <table class="order-addresses">
+            <tr>
+                <th>
+                    {% trans 'Shipping address' %}
+                </th>
+                <th>
+                    {% trans 'Invoice address' %}
+                </th>
+                <th>
+                    {% trans 'Shipping method' %}
+                </th>
+                <th>
+                    {% trans 'Payment method' %}
+                </th>
+            </tr>
+            <tr>
+                <td>
+                    <div>
+                        {{ order.shipping_firstname }}
+                    </div>
+                    <div>
+                        {{ order.shipping_lastname }}
+                    </div>
+                    <div>
+                        {{ order.shipping_company_name }}
+                    </div>
+                    <div>
+                        {{ order.shipping_street }}
+                    </div>
+                    <div>
+                        {{ order.shipping_zip_code }} {{ order.shipping_city }}
+                    </div>
+                    <div>
+                        {{ order.shipping_country }}
+                    </div>
+                    <div>
+                        {{ order.shipping_phone }}
+                    </div>
+                    <div>
+                        {{ order.shipping_email }}
+                    </div>
+                </td>
+                <td>
+                    <div>
+                        {{ order.invoice_firstname }}
+                    </div>
+                    <div>
+                        {{ order.invoice_lastname }}
+                    </div>
+                    <div>
+                        {{ order.invoice_company_name }}
+                    </div>
+                    <div>
+                        {{ order.invoice_street }}
+                    </div>
+                    <div>
+                        {{ order.invoice_zip_code }} {{ order.invoice_city }}
+                    </div>
+                    <div>
+                        {{ order.invoice_country }}
+                    </div>
+                    <div>
+                        {{ order.invoice_phone }}
+                    </div>
+                    <div>
+                        {{ order.invoice_email }}
+                    </div>
+                </td>
+                <td>
+                    <div>
+                        {{ order.shipping_method }}
+                    </div>
+                </td>
+                <td>
+                    <div>
+                        {{ order.payment_method.name }}
+                    </div>
+                    {% ifequal order.payment_method.id 1 %}
+                        <div>
+                            {{ order.account_number }}
+                        </div>
+                        <div>
+                            {{ order.bank_identification_code }}
+                        </div>
+                        <div>
+                            {{ order.bank_name }}
+                        </div>
+                        <div>
+                            {{ order.depositor }}
+                        </div>
+                    {% endifequal %}
+                    {% ifequal order.payment_method.id 3 %}
+                        <div>
+                            <a href="{{ order.get_pay_link }}"
+                               class="order-pay-link">{% trans 'Pay now' %}</a>
+                        </div>
+                    {% endifequal %}
+                </td>
+            </tr>
+
+        </table>
+
+        <table class="order-items"
+               width="100%">
+            <tr>
+                <th>
+                    {% trans 'SKU' %}
+                </th>
+                <th>
+                    {% trans 'Name' %}
+                </th>
+                <th class="number">
+                    {% trans 'Amount' %}
+                </th>
+                <th class="number">
+                    {% trans 'Price' %}
+                </th>
+                <th class="number">
+                    {% trans 'Total' %}
+                </th>
+            </tr>
+            {% for item in order.items.all %}
+                <tr>
+                    <td>
+                       {{ item.product_sku }}
+                    </td>
+                    <td>
+                       {{ item.product_name }}
+                       {% for option in item.product.get_options %}
+                            {% if option.property.display_on_product %}
+                               <div>
+                                   {{ option.property.name }} : {{ option.value|option_name }} {{ option.property.unit|safe }}
+                               </div>
+                            {% endif %}
+                       {% endfor %}
+
+                        {% if item.product.is_configurable_product %}
+                            {% for property in item.properties.all %}
+                                <div>
+                                    {{ property.property.name }} : {{ property.value|quantity }} {{ property.property.unit|safe }}
+                                </div>
+                            {% endfor %}
+                        {% endif %}
+
+                    </td>
+                    <td class="number">
+                        {{ item.product_amount }} {{ item.product.price_unit }}
+                        {% if item.product.active_packing_unit %} 
+                            <span class="packing-unit">
+                                ({{ item|packages }} {{ item.product.packing_unit_unit }})
+                            </span>
+                        {% endif %}                      
+                    </td>
+                    <td class="number">
+                       {{ item.product_price_gross|currency }}{% if item.product.price_unit %} / {{ item.product.price_unit }}{% endif %}
+                    </td>
+                    <td class="number">
+                       {{ item.price_gross|currency }}
+                    </td>
+                </tr>
+            {% endfor %}
+
+            {% if order.voucher_number %}
+                <tr>
+                    <td></td>
+                    <td>
+                        {% trans 'Voucher' %} ({{ order.voucher_number }})
+                    </td>
+                    <td class="number">
+                        1
+                    </td>
+                    <td class="number">
+                        - {{ order.voucher_price|currency }}
+                    </td>
+                    <td class="number">
+                        - {{ order.voucher_price|currency }}
+                    </td>
+                </tr>
+            {% endif %}
+
+            <tr>
+                <td></td>
+                <td>
+                    {% trans 'Shipping' %} ({{ order.shipping_method }})
+                </td>
+                <td class="number">
+                    1
+                </td>
+                <td class="number">
+                    {{ order.shipping_price|currency }}
+                </td>
+                <td class="number">
+                    {{ order.shipping_price|currency }}
+                </td>
+            </tr>
+            <tr>
+                <td></td>
+                <td>
+                    {% trans 'Payment' %} ({{ order.payment_method }})
+                </td>
+                <td class="number">
+                    1
+                </td>
+                <td class="number">
+                    {{ order.payment_price|currency }}
+                </td>
+                <td class="number">
+                    {{ order.payment_price|currency }}
+                </td>
+            </tr>
+            <tr class="total">
+                <td colspan="5"
+                    class="number total">
+                    {{ order.price|currency }}
+                </td>
+            </tr>
+            <tr>
+                <td colspan="5"
+                    class="number tax">
+                    <span class="total-label">{% trans 'Inclusive VAT' %}:</span>
+                    {{ order.tax|currency }}
+                </td>
+            </tr>
+        </table>
+        {% if order.message %}
+            <table class="order-message">
+                <tr>
+                    <th colspan="5">
+                        {% trans 'Your message to us' %}
+                    </th>
+                </tr>
+                <tr>
+                    <td colspan="5">
+                        {{ order.message }}
+                    </td>
+                </tr>
+            </table>
+        {% endif %}
+    </body>
+</html>

File lfstheme/templates/lfs/mail/order_sent_mail.txt

+Your order has been sent
+
+{% load i18n %}{% load lfs_tags %}
+{% trans 'General' %}
+==============================================================================
+{% trans 'Customer name' %}: {{ order.customer_firstname }} {{ order.customer_lastname }}
+{% trans 'Date' %}: {{ order.created|date:_("DATETIME_FORMAT") }}
+{% trans 'E-mail' %}: {{ order.customer_email }}
+{% trans 'State' %}: {{ order.get_state_display }}
+{% trans 'Phone' %}: {{ order.shipping_phone }}
+{% trans 'Total' %}: {{ order.price|currency }}
+
+{% trans 'Shipping address' %}
+==============================================================================
+{{ order.shipping_firstname }} {{ order.shipping_lastname }}
+{{ order.shipping_company_name }}
+{{ order.shipping_street }}
+{{ order.shipping_zip_code }} {{ order.shipping_city }}
+{{ order.shipping_country }}
+{{ order.shipping_phone }}
+{{ order.shipping_email }}
+
+{% trans 'Invoice address' %}
+==============================================================================
+{{ order.invoice_firstname }} {{ order.invoice_lastname }}
+{{ order.invoice_company_name }}
+{{ order.invoice_street }}
+{{ order.invoice_zip_code }} {{ order.invoice_city }}
+{{ order.invoice_country }}
+{{ order.invoice_phone }}
+{{ order.invoice_email }}
+
+{% trans 'Shipping method' %}: 
+==============================================================================
+{{ order.shipping_method }}
+
+{% trans 'Payment method' %}: 
+==============================================================================
+{{ order.payment_method.name }}{% ifequal order.payment_method.id 1 %}
+{{ order.account_number }}
+{{ order.bank_identification_code }}
+{{ order.bank_name }}
+{{ order.depositor }}{% endifequal %}{% ifequal order.payment_method.id 3 %}\n{% trans 'Pay now' %}: {{ order.get_pay_link }}{% endifequal %}
+
+{% trans 'Order' %}: 
+==============================================================================
+{% for item in order.items.all %}{% trans 'SKU' %}:  {{ item.product_sku }}
+{% trans 'Name' %}: {{ item.product_name }} {% for option in item.product.get_options %}{% if option.property.display_on_product %}{{ option.property.name }} : {{ option.value|option_name }} {{ option.property.unit|safe }}\n{% endif %}{% endfor %}
+{% trans 'Amount' %}: {{ item.product_amount }} {{ item.product.price_unit }} {% if item.product.active_packing_unit %}{{ item|packages }} {{ item.product.packing_unit_unit }}{% endif %} 
+{% trans 'Price' %}: {{ item.product_price_gross|currency }}
+{% trans 'Total' %}: {{ item.price_gross|currency }}
+{% endfor %}{% if order.voucher_number %}\n{% trans 'Voucher' %} ({{ order.voucher_number }})\n- {{ order.voucher_price|currency }}\n- {{ order.voucher_price|currency }}{% endif %}
+{% trans 'Shipping method' %}: {{ order.shipping_price|currency }} ({{ order.shipping_method }}) 
+{% trans 'Payment method' %}: {{ order.payment_price|currency }} ({{ order.payment_method }})
+
+{% trans ' Total' %}: {{ order.price|currency }}
+{% trans 'Inclusive VAT' %}: {{ order.tax|currency }}
+
+{% if order.message %}\n{% trans 'Message' %}
+==============================================================================
+{{ order.message }}{% endif %}