36 lines
1.3 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<article>
<header>
<h1>Wholesale</h1>
</header>
{% if user.is_authenticated %}
<section>
<p><a href="{% url 'storefront:wholesale-order-create' %}" class="btn">New wholesale order</a></p>
<table>
{% for order in user.wholesale_orders.all %}
<tr>
<td>{{ order.created_at }}</td>
<td>
<a href="{% url 'storefront:wholesale-order-detail' user.pk order.pk %}"No. {{ order.pk }}</a>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<section id="wholesale-faq">
<div>
<h4>I would like to become a wholesale customer</h4>
<p>You must be a wholesale customer to place an order. <a href="mailto:{{ site_settings.default_contact_email }}">Contact us</a> to become a wholesale customer.</p>
</div>
<div>
<h4>I'm already a wholesale customer</h4>
<p>If you are already a wholesale customer, please <a href="{% url 'account_login' %}?next=/wholesale-orders/new/">login</a> and return to this page to place an order.<p>
</div>
</section>
{% endif %}
</article>
{% endblock %}