AgPerry's picture
Add files using upload-large-folder tool
366d6fd verified
Raw History Blame Contribute Delete
1.61 kB
{% extends "base.html" %}
{% block title %}Your Account - Apple{% endblock %}
{% block content %}
<div class="wrap">
<div class="listing-head">
<h1>Your Account</h1>
<p class="count" data-testid="account-email">{{ visitor.display_name }} · {{ visitor.email }}</p>
</div>
<h2>Your orders</h2>
{% if orders %}
<ul class="order-list" data-testid="order-list">
{% for order in orders %}
<li>
<a href="/shop/order/{{ order.id }}">{{ order.id }}</a>
· {{ order.status }} · {{ order.placed_at }} · {{ order.total_display }}
· {{ order['items']|length }} item{{ '' if order['items']|length == 1 else 's' }}
</li>
{% endfor %}
</ul>
{% else %}
<p data-testid="no-orders">You haven&rsquo;t placed any orders yet.</p>
{% endif %}
<h2>Saved items</h2>
{% if saved_products %}
<ul class="product-grid">
{% for product in saved_products %}
<li class="product-card">
<a href="{{ product.href }}"><img src="{{ product.image }}" alt="{{ product.name }}" loading="lazy" width="890" height="890"></a>
<a class="name" href="{{ product.href }}">{{ product.name }}</a>
<span class="price">{{ product.price_display }}</span>
<form method="post" action="/shop/account">
<input type="hidden" name="sku" value="{{ product.sku }}">
<button type="submit" name="intent" value="unsave">Remove</button>
</form>
</li>
{% endfor %}
</ul>
{% else %}
<p data-testid="no-saved">Nothing saved yet.</p>
{% endif %}
<p><a class="pill ghost" href="/shop/signout">Sign Out</a></p>
</div>
{% endblock %}