Spaces:
Runtime error
Runtime error
Delete templates/checkout.html
Browse files- templates/checkout.html +0 -76
templates/checkout.html
DELETED
|
@@ -1,76 +0,0 @@
|
|
| 1 |
-
<!-- templates/checkout.html -->
|
| 2 |
-
{% extends "_layout.html" %}
|
| 3 |
-
{% block title %}EcoTry — Checkout{% endblock %}
|
| 4 |
-
|
| 5 |
-
{% block head %}
|
| 6 |
-
<style>
|
| 7 |
-
.panel{ margin-top: 16px; padding: 14px; }
|
| 8 |
-
.grid{ display:grid; grid-template-columns: 1fr 0.8fr; gap: 14px; }
|
| 9 |
-
.box{ border: 1px solid var(--line); background: rgba(255,255,255,0.04); border-radius: 18px; padding: 14px; }
|
| 10 |
-
.field{ display:grid; gap: 6px; margin-bottom: 10px; }
|
| 11 |
-
label{ font-size: 12px; color: var(--muted); }
|
| 12 |
-
input, textarea{
|
| 13 |
-
width: 100%; padding: 12px; border-radius: 14px; border: 1px solid var(--line);
|
| 14 |
-
background: rgba(255,255,255,0.04); color: var(--text); outline:none;
|
| 15 |
-
}
|
| 16 |
-
textarea{ min-height: 92px; resize: vertical; }
|
| 17 |
-
.muted{ color: var(--muted); font-size: 12px; }
|
| 18 |
-
.line{ display:flex; justify-content:space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
|
| 19 |
-
@media (max-width: 920px){ .grid{ grid-template-columns: 1fr; } }
|
| 20 |
-
</style>
|
| 21 |
-
{% endblock %}
|
| 22 |
-
|
| 23 |
-
{% block body %}
|
| 24 |
-
<div class="panel">
|
| 25 |
-
<h2 style="margin:0 0 6px;">Checkout</h2>
|
| 26 |
-
<div class="muted">Demo checkout (no real payment yet). Eco average shown for your order.</div>
|
| 27 |
-
|
| 28 |
-
<div class="grid" style="margin-top: 14px;">
|
| 29 |
-
<div class="box">
|
| 30 |
-
<h3 style="margin:0 0 10px;">Customer Details</h3>
|
| 31 |
-
<form method="post" action="{{ url_for('checkout') }}">
|
| 32 |
-
<div class="field">
|
| 33 |
-
<label>Full Name</label>
|
| 34 |
-
<input name="name" placeholder="Your name">
|
| 35 |
-
</div>
|
| 36 |
-
<div class="field">
|
| 37 |
-
<label>Email</label>
|
| 38 |
-
<input name="email" placeholder="you@example.com">
|
| 39 |
-
</div>
|
| 40 |
-
<div class="field">
|
| 41 |
-
<label>Delivery Address</label>
|
| 42 |
-
<textarea name="address" placeholder="Street, City, Postal Code"></textarea>
|
| 43 |
-
</div>
|
| 44 |
-
|
| 45 |
-
<div style="display:flex; gap: 10px;">
|
| 46 |
-
<a class="btn-ghost" href="{{ url_for('cart_page') }}">Back to Cart</a>
|
| 47 |
-
<button class="btn" type="submit">Place Order</button>
|
| 48 |
-
</div>
|
| 49 |
-
</form>
|
| 50 |
-
</div>
|
| 51 |
-
|
| 52 |
-
<div class="box">
|
| 53 |
-
<h3 style="margin:0 0 10px;">Order Summary</h3>
|
| 54 |
-
|
| 55 |
-
{% for l in lines %}
|
| 56 |
-
<div class="line">
|
| 57 |
-
<div>
|
| 58 |
-
<div style="font-weight:700;">{{ l['product_name'] }}</div>
|
| 59 |
-
<div class="muted">Qty: {{ l['qty'] }}</div>
|
| 60 |
-
</div>
|
| 61 |
-
<div class="muted">Eco: {{ '%.1f'|format(l['eco']) }}</div>
|
| 62 |
-
</div>
|
| 63 |
-
{% endfor %}
|
| 64 |
-
|
| 65 |
-
<div style="display:flex; justify-content:space-between; margin-top: 12px;">
|
| 66 |
-
<div class="muted">Eco Average</div>
|
| 67 |
-
<div style="font-weight:800; color: rgba(255,255,255,0.92);">{{ eco_avg }}/10</div>
|
| 68 |
-
</div>
|
| 69 |
-
|
| 70 |
-
<div class="muted" style="margin-top: 10px;">
|
| 71 |
-
Next upgrade: add payment gateway (Stripe) + order DB storage.
|
| 72 |
-
</div>
|
| 73 |
-
</div>
|
| 74 |
-
</div>
|
| 75 |
-
</div>
|
| 76 |
-
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|