{% load i18n satchmo_currency satchmo_discounts %}{% with order.contact.first_name as first_name %}{% with order.contact.last_name as last_name %}{% blocktrans %}Dear {{ first_name }} {{ last_name }},{% endblocktrans %}{% endwith %}{% endwith %}

{% with order.contact.email as email %}{% with order.contact.full_name as customer %}{% blocktrans %}Order placed on {{ shop_name }} by {{ customer }}<{{ email }}>.{% endblocktrans %}{% endwith %}{% endwith %}

{% trans "Items Ordered" %}
--------------
{% for item in order.orderitem_set.all %}
{{ item }} - {{item.product|discount_price:sale|currency }} x {{item.quantity}} = {{item|discount_line_total:sale|currency}}
{% endfor %}

{% trans "Contact Information" %}
-------------------
{{ order.contact.full_name }}
{{ order.contact.email }}
{{ order.contact.primary_phone.phone }}

{% trans "Billing Information" %}
-------------------
{{ order.full_bill_street }}
{{ order.bill_city }} 
{{ order.bill_state }}
{{ order.bill_postal_code }}
{{ order.bill_country }}

{% if order.is_shippable %}
{% trans "Shipping Address" %}
----------------
{{ order.full_ship_street }}
{{ order.ship_city }}
{{ order.ship_state }}
{{ order.ship_postal_code }}
{{ order.ship_country }}
{% endif %}

{% if shipping_method %}
{% trans "Shipping Method" %}
---------------
{{ order.shipping_description }}
{{ order.shipping_method }} 
{{ order.shipping_sub_total|currency }} 
{% endif %}

{% trans "Total" %}
-----
{% if order.discount %}
{% trans "Discount" %} - {{order.discount|currency}}
{% endif %}
{% if order.is_shippable %} {% trans "Shipping" %} + {{order.shipping_sub_total|currency}} {% endif %}
{% if order.tax %}
{% trans "Tax" %} + {{order.tax|currency}}
{% endif %}
{% trans "Total" %} = {{order.total|currency}}

{% trans "Payment" %}
-------
{% with order.credit_card.credit_type as credit_card_type %}
{% with order.credit_card.display_cc as credit_card_number %}
{% with order.total|currency as order_total %}
{% blocktrans %}{{ credit_card_type }} card ending in {{ credit_card_number }} will be charged {{ order_total }}.{% endblocktrans %}
{% endwith %}
{% endwith %}
{% endwith %}

{% if order.has_downloads %}
{% trans "This is a downloadable product" %}
{% for download in order.downloadlink_set.all %}
{{ download.product_name }} - {{download.get_full_url}}
{% endfor %}
{% endif %}
