AgPerry's picture
Add files using upload-large-folder tool
366d6fd verified
Raw History Blame Contribute Delete
3.02 kB
{% extends "base.html" %}
{% block title %}Bag - Apple{% endblock %}
{% block content %}
<div class="wrap">
{% if lines %}
<div class="bag-head">
<h1>Review your bag.</h1>
<p>Free delivery and free returns.</p>
</div>
{% for line in lines %}
<div class="bag-line" data-sku="{{ line.sku }}">
<img src="{{ line.image }}" alt="{{ line.name }}" width="890" height="890">
<div>
<a href="{{ line.href }}">{{ line.name }}</a>
<form class="qty" method="post" action="/shop/bag">
<input type="hidden" name="sku" value="{{ line.sku }}">
<label>
<span class="visually-hidden">Quantity of {{ line.name }}</span>
<input type="number" name="quantity" min="0" max="99" step="1"
value="{{ line.quantity }}" data-testid="quantity"
aria-label="Quantity of {{ line.name }}">
</label>
<button type="submit" name="intent" value="update">Update</button>
<button type="submit" name="intent" value="remove"
aria-label="Remove {{ line.name }}">Remove</button>
</form>
</div>
<div>{{ line.line_total_display }}</div>
</div>
{% endfor %}
<div class="bag-totals">
<div><span>Subtotal</span><span data-testid="subtotal">{{ totals.subtotal_display }}</span></div>
<div><span>Shipping</span><span>FREE</span></div>
<div><span>Estimated tax</span><span>{{ totals.tax_display }}</span></div>
<div class="grand"><span>Total</span><span data-testid="total">{{ totals.total_display }}</span></div>
<p><a class="pill" href="/shop/checkout">Check Out</a></p>
<p class="finance">Free delivery and free returns.</p>
</div>
{% else %}
<div class="bag-head">
<h1>Your bag is empty.</h1>
<p>Sign in to see if you have any saved items. Or continue shopping.</p>
<div class="cta-row">
<a class="pill" href="/shop/signin">Sign In</a>
<a class="pill ghost" href="/shop/accessories/all/cases-protection">Continue Shopping</a>
</div>
</div>
{% endif %}
{% if saved_products %}
<section class="section">
<h2 style="font-size:32px;line-height:36px;">Saved items</h2>
<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>
</li>
{% endfor %}
</ul>
</section>
{% endif %}
<section class="section">
<h2 style="font-size:32px;line-height:36px;">Questions About Buying</h2>
<div class="accordion" style="text-align:left;max-width:700px;margin:0 auto;">
{% for faq in faqs %}
<details>
<summary>{{ faq.question }}</summary>
<div class="body"><p>{{ faq.answer }}</p></div>
</details>
{% endfor %}
</div>
</section>
</div>
{% endblock %}