<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <title>Interiorshop</title>

        <style type="text/css">
            html {
                width: 100%;
            }

            body {
                width: 100%;
                font-family: Arial;
                font-size: 14px;
                background-color: #fff;
                color: #333;
            }
        </style>
    </head>

    <body>
        <table width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td><h1>New order</h1></td>
            </tr>

            <tr>
                <td>
                    <h3>Details</h3>

                    <b>Name:</b> {{ order.first_name }} {{ order.last_name }}<br>
                    <b>Address:</b> {{ order.address }}<br>
                    <b>Zip and place:</b> {{ order.zipcode }} {{ order.place }}<br>
                    <b>E-mail:</b> {{ order.email }}<br>
                    <b>Phone:</b> {{ order.phone }}
                </td>
            </tr>

            <tr>
                <td>
                    <h3>Products</h3>

                    <table width="100%" cellspacing="0" cellpadding="0">
                        <tr>
                            <td><b>Product</b></td>
                            <td><b>Price</b></td>
                            <td><b>Quantity</b></td>
                            <td><b>Total</b></td>
                        </tr>
                        
                        {% for item in order.items.all %}
                            {% if item.vendor == vendor %}
                                <tr>
                                    <td>{{ item.product.title }}</td>
                                    <td>${{ item.product.price }}</td>
                                    <td>{{ item.quantity }}</td>
                                    <td>${{ item.get_total_price }}</td>
                                </tr>
                            {% endif %}
                        {% endfor %}
                    </table>
                </td>
            </tr>
        </table>
    </body>
</html>