bounty board feature buyers to see bounty boards seller profile page (like have theme chooser) Have the game and set name be filters. Add cards to vault manually update card inventory add to have the autocomplete for the card - store analytics, clicks, views, link to store (url/QR code) bulk item inventory creation -- Make the banner feature flag driven so I can have a beta site setup like the primary site don't use primary key values in urls - update to use uuid4 values site analytics. tianji is being sent item potent on the mtg and lorcana populate scripts Card item images for specific listings check that when you buy a card it is in the vault Buys should be able to search on store inventories More pie charts for the seller! post bounty board is slow to load seller reviews/ratings - show a historgram - need a way for someone to rate Report a seller feature for buyer to report Make sure the stlying is consistent based on the theme choosen smart minimum order quantity and shipping amounts (defined by the store itself) put virtual packs behind a feature flag like bounty board proxy service feature flag Terms of Service new description for TCGKof store SSN, ITIN, and EIN optomize for SEO
155 lines
9.0 KiB
HTML
155 lines
9.0 KiB
HTML
{% extends 'base/layout.html' %}
|
|
|
|
{% block content %}
|
|
<div class="container" style="max-width: 800px; margin: 0 auto; padding: 2rem;">
|
|
<div style="margin-bottom: 2rem; display: flex; justify-content: space-between; align-items: center;">
|
|
<h1 style="margin: 0;">Order #{{ order.id }}</h1>
|
|
<a href="{% url 'users:profile' %}" class="btn" style="background-color: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-color);">Back to Profile</a>
|
|
</div>
|
|
|
|
<div style="background: var(--card-bg); padding: 2rem; border-radius: 0.5rem; border: 1px solid var(--border-color); margin-bottom: 2rem;">
|
|
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem;">
|
|
<div>
|
|
<p style="color: #94a3b8; font-size: 0.875rem; margin-bottom: 0.5rem;">Date Placed</p>
|
|
<p style="font-weight: 600;">{{ order.created_at|date:"F j, Y, P" }}</p>
|
|
</div>
|
|
<div>
|
|
<p style="color: #94a3b8; font-size: 0.875rem; margin-bottom: 0.5rem;">Status</p>
|
|
<span style="display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; background: #334155; font-size: 0.875rem; font-weight: 600;">
|
|
{{ order.get_status_display }}
|
|
</span>
|
|
</div>
|
|
<div>
|
|
<p style="color: #94a3b8; font-size: 0.875rem; margin-bottom: 0.5rem;">Total Amount</p>
|
|
<p style="font-weight: 600; font-size: 1.25rem;">${{ order.total_price }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
{% if order.insurance_purchased %}
|
|
<div style="margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color);">
|
|
<p style="display: flex; align-items: center; gap: 0.5rem; color: #10b981;">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>
|
|
Shipping Insurance Included
|
|
</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<h3 style="margin-bottom: 1.5rem;">Order Items</h3>
|
|
<div style="display: grid; gap: 1rem;">
|
|
{% for item in order.items.all %}
|
|
<div style="background: var(--card-bg); padding: 1.5rem; border-radius: 0.5rem; border: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center;">
|
|
<div style="display: flex; align-items: center; gap: 1rem;">
|
|
{% if item.listing and item.listing.card.image_url %}
|
|
<img src="{{ item.listing.card.image_url }}" alt="{{ item.listing.card.name }}" style="width: 50px; border-radius: 4px;">
|
|
{% elif item.pack_listing and item.pack_listing.image_url %}
|
|
<img src="{{ item.pack_listing.image_url }}" alt="{{ item.pack_listing.name }}" style="width: 50px; border-radius: 4px;">
|
|
{% else %}
|
|
<div style="width: 50px; height: 70px; background: #334155; border-radius: 4px;"></div>
|
|
{% endif %}
|
|
|
|
<div>
|
|
{% if item.listing %}
|
|
<h4 style="margin: 0; font-size: 1rem;">{{ item.listing.card.name }}</h4>
|
|
<p style="margin: 0.25rem 0 0; color: #94a3b8; font-size: 0.875rem;">
|
|
{{ item.listing.card.set.name }} • {{ item.listing.get_condition_display }} • {% if item.listing.is_foil %}Foil{% else %}Non-Foil{% endif %}
|
|
</p>
|
|
{% elif item.pack_listing %}
|
|
<h4 style="margin: 0; font-size: 1rem;">{{ item.pack_listing.name }}</h4>
|
|
<p style="margin: 0.25rem 0 0; color: #94a3b8; font-size: 0.875rem;">Booster Pack</p>
|
|
{% else %}
|
|
<h4 style="margin: 0; font-size: 1rem;">Unknown Item</h4>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div style="text-align: right;">
|
|
<p style="margin: 0; font-weight: 600;">${{ item.price_at_purchase }}</p>
|
|
<p style="margin: 0.25rem 0 0; color: #94a3b8; font-size: 0.875rem;">Qty: {{ item.quantity }}</p>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<!-- Rating Section -->
|
|
{% if order.seller %}
|
|
<div style="background: var(--card-bg); padding: 2rem; border-radius: 0.5rem; border: 1px solid var(--border-color); margin-top: 2rem;">
|
|
<h3 style="margin-bottom: 1rem;">Rate Your Order</h3>
|
|
|
|
{% if order.rating %}
|
|
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
<p style="margin: 0; color: #94a3b8;">You rated this order:</p>
|
|
<div style="display: flex; gap: 0.25rem;">
|
|
{% for i in "12345" %}
|
|
{% if forloop.counter <= order.rating %}
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#fbbf24" stroke="#fbbf24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
</svg>
|
|
{% else %}
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#64748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
</svg>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
<p style="margin: 0; font-weight: 600;">{{ order.rating }}/5</p>
|
|
</div>
|
|
{% else %}
|
|
<p style="color: #94a3b8; margin-bottom: 1rem;">How would you rate your experience with {{ order.seller.store_name }}?</p>
|
|
<form method="post" style="display: flex; gap: 1rem; align-items: center;">
|
|
{% csrf_token %}
|
|
<div style="display: flex; gap: 0.5rem;" id="star-rating">
|
|
{% for i in "12345" %}
|
|
<label style="cursor: pointer;">
|
|
<input type="radio" name="rating" value="{{ forloop.counter }}" style="display: none;" class="rating-input">
|
|
<svg class="star-icon" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="#64748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="transition: all 0.2s;">
|
|
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
</svg>
|
|
</label>
|
|
{% endfor %}
|
|
</div>
|
|
<button type="submit" class="btn" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; opacity: 0.5; pointer-events: none;" id="submit-rating" disabled>Submit Rating</button>
|
|
</form>
|
|
|
|
<script>
|
|
const stars = document.querySelectorAll('.star-icon');
|
|
const ratingInputs = document.querySelectorAll('.rating-input');
|
|
const submitBtn = document.getElementById('submit-rating');
|
|
let selectedRating = 0;
|
|
|
|
stars.forEach((star, index) => {
|
|
star.addEventListener('mouseenter', () => {
|
|
highlightStars(index + 1);
|
|
});
|
|
|
|
star.addEventListener('click', () => {
|
|
selectedRating = index + 1;
|
|
ratingInputs[index].checked = true;
|
|
submitBtn.disabled = false;
|
|
submitBtn.style.opacity = '1';
|
|
submitBtn.style.pointerEvents = 'auto';
|
|
});
|
|
});
|
|
|
|
document.getElementById('star-rating').addEventListener('mouseleave', () => {
|
|
highlightStars(selectedRating);
|
|
});
|
|
|
|
function highlightStars(count) {
|
|
stars.forEach((star, index) => {
|
|
if (index < count) {
|
|
star.setAttribute('fill', '#fbbf24');
|
|
star.setAttribute('stroke', '#fbbf24');
|
|
} else {
|
|
star.setAttribute('fill', 'none');
|
|
star.setAttribute('stroke', '#64748b');
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|