{% extends 'dashboard/layout.html' %} {% load currency_filters %} {% load i18n %} {% block body_class %}users{% endblock %} {% block title %} {% blocktrans with email=customer.email %}{{ email }}{% endblocktrans %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %} {% blocktrans with email=customer.email %}{{ email }}{% endblocktrans %} {% endblock %} {% block dashboard_content %}

{% trans "General" %}

  • {% trans "Email:" %} {{ customer.email }}
  • {% trans "First name:" %} {{ customer.first_name|default:"-" }}
  • {% trans "Last name:" %} {{ customer.last_name|default:"-" }}
  • {% if customer.is_active %} {% trans "This customer is active" %} {% else %} {% trans "This customer is inactive" %} {% endif %}
  • {% if customer.is_superuser %}
  • {% trans "Superuser" %}
  • {% endif %}

{% trans "Detailed information" %}

{% trans "General" %}

  • {% trans "Last login:" %} {{ customer.last_login }}
  • {% trans "Date joined:" %} {{ customer.date_joined }}
  • {% trans "Number of viewed products:" %} {{ customer.userrecord.num_product_views|default:0 }}

{% trans "Orders" %}

  • {% trans "Number of orders:" %} {{ customer.userrecord.num_orders|default:0 }}
  • {% trans "Number of ordered items:" %} {{ customer.userrecord.num_order_items|default:0 }}
  • {% trans "Total spent:" %} {{ customer.userrecord.total_spent|default:0|currency }}
  • {% trans "Date of last order:" %} {{ customer.userrecord.date_last_order|default:"-" }}

{% trans "Reviews" %}

  • {% trans "Number of reviews:" %} {{ customer.reviews.count }}

{% trans "Orders" %}

{% if customer.orders.count %} {% for order in customer.orders.all %} {% endfor %}
{% trans "Order Number" %} {% trans "Num items" %} {% trans "Total value" %} {% trans "Date placed" %} {% trans "Status" %}
{{ order.number }} {{ order.num_items }} {{ order.basket_total_incl_tax|currency }} {{ order.date_placed|date:"d/m/y H:s" }} {{ order.status }} {% trans "View" %}
{% else %}

{% trans "This customer has not placed any orders yet." %}

{% endif %}

{% trans "Addresses" %}

{% for address in customer.addresses.all %}
{% for field in address.active_address_fields %} {{ field }}
{% endfor %}
{% if forloop.counter|divisibleby:4 %}
{% if not forloop.last %}
{% endif %} {% endif %} {% empty %}

{% trans "This customer has not saved any addresses." %}

{% endfor %}

{% trans "Reviews" %}

{% if customer.reviews.count %} {% for review in customer.reviews.all %} {% endfor %}
{% trans "Product ID" %} {% trans "Score" %} {% trans "Title" %} {% trans "Body" %} {% trans "Date created" %}
{{ review.product_id }} {{ review.score }} {{ review.title }} {{ review.body }} {{ review.date_created }}
{% else %}

{% trans "This customer has not written any reviews yet." %}

{% endif %}
{% endblock dashboard_content %}