MASSIVE UPDATE:
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
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div style="display: grid; grid-template-columns: 250px 1fr; gap: 2rem;">
|
||||
<div class="browse-container" style="display: grid; grid-template-columns: 250px 1fr; gap: 2rem;">
|
||||
<!-- Sidebar Filters -->
|
||||
<aside
|
||||
<aside class="browse-sidebar"
|
||||
style="background: var(--card-bg); padding: 1.5rem; border-radius: 0.5rem; border: 1px solid var(--border-color); height: fit-content;">
|
||||
<h3 style="margin-top: 0;">Filters</h3>
|
||||
<form method="get">
|
||||
@@ -29,19 +29,80 @@
|
||||
style="width: 100%; padding: 0.5rem; border-radius: 0.25rem; background: var(--bg-color); color: var(--text-color); border: 1px solid var(--border-color);">
|
||||
<option value="">All Sets</option>
|
||||
{% for set in sets %}
|
||||
<option value="{{ set.id }}" {% if request.GET.set|add:"0" == set.id %}selected{% endif %}>{{ set.name
|
||||
}}</option>
|
||||
<option value="{{ set.id }}" {% if request.GET.set|add:"0" == set.id %}selected{% endif %}>{{ set.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div style="margin-bottom: 1rem;">
|
||||
<label style="display: block; font-size: 0.875rem; margin-bottom: 0.5rem;">Search</label>
|
||||
<input type="text" name="q" value="{{ search_query|default:'' }}" placeholder="Card name..."
|
||||
style="width: 90%; padding: 0.5rem; border-radius: 0.25rem; background: var(--bg-color); color: var(--text-color); border: 1px solid var(--border-color);">
|
||||
<div style="margin-bottom: 1rem; display: flex; align-items: center;">
|
||||
<input type="checkbox" id="hide_out_of_stock" name="hide_out_of_stock" {% if hide_oos == 'on' %}checked{% endif %} onchange="this.form.submit()" style="margin-right: 0.5rem;">
|
||||
<label for="hide_out_of_stock" style="font-size: 0.875rem; cursor: pointer;">Hide Out of Stock</label>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1rem; position: relative;">
|
||||
<label style="display: block; font-size: 0.875rem; margin-bottom: 0.5rem;">Search</label>
|
||||
<input type="text" name="q" id="search-input" value="{{ search_query|default:'' }}" placeholder="Card name..." autocomplete="off"
|
||||
style="width: 90%; padding: 0.5rem; border-radius: 0.25rem; background: var(--bg-color); color: var(--text-color); border: 1px solid var(--border-color);">
|
||||
<ul id="suggestions-list" style="display: none; position: absolute; top: 100%; left: 0; width: 90%; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 0.25rem; z-index: 1000; list-style: none; padding: 0; margin: 0; max-height: 200px; overflow-y: auto;">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const searchInput = document.getElementById('search-input');
|
||||
const suggestionsList = document.getElementById('suggestions-list');
|
||||
let debounceTimer;
|
||||
|
||||
searchInput.addEventListener('input', function() {
|
||||
const query = this.value;
|
||||
clearTimeout(debounceTimer);
|
||||
if (query.length < 2) {
|
||||
suggestionsList.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
debounceTimer = setTimeout(() => {
|
||||
fetch(`/api/card-autocomplete/?q=${encodeURIComponent(query)}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
suggestionsList.innerHTML = '';
|
||||
if (data.results.length > 0) {
|
||||
data.results.forEach(name => {
|
||||
const li = document.createElement('li');
|
||||
li.textContent = name;
|
||||
li.style.padding = '0.5rem';
|
||||
li.style.cursor = 'pointer';
|
||||
li.style.borderBottom = '1px solid var(--border-color)';
|
||||
|
||||
li.addEventListener('mouseenter', () => {
|
||||
li.style.background = 'var(--card-bg)';
|
||||
});
|
||||
li.addEventListener('mouseleave', () => {
|
||||
li.style.background = 'transparent';
|
||||
});
|
||||
|
||||
li.addEventListener('click', () => {
|
||||
searchInput.value = name;
|
||||
suggestionsList.style.display = 'none';
|
||||
searchInput.form.submit();
|
||||
});
|
||||
suggestionsList.appendChild(li);
|
||||
});
|
||||
suggestionsList.style.display = 'block';
|
||||
} else {
|
||||
suggestionsList.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
document.addEventListener('click', function(e) {
|
||||
if (e.target !== searchInput && e.target !== suggestionsList) {
|
||||
suggestionsList.style.display = 'none';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<button type="submit" class="btn" style="width: 100%;">Apply Filters</button>
|
||||
<a href="{% url 'store:card_list' %}"
|
||||
style="display: block; text-align: center; margin-top: 1rem; color: #94a3b8; font-size: 0.875rem; text-decoration: none;">Clear
|
||||
@@ -55,7 +116,7 @@
|
||||
<div class="card-grid">
|
||||
{% for card in page_obj %}
|
||||
<div class="tcg-card">
|
||||
<a href="{% url 'store:card_detail' card.id %}" style="text-decoration: none; color: inherit;">
|
||||
<a href="{% url 'store:card_detail' card.uuid %}" style="text-decoration: none; color: inherit;">
|
||||
<div style="aspect-ratio: 2.5/3.5; background: #000; position: relative;">
|
||||
<!-- Placeholder or Real Image -->
|
||||
{% if card.image_url %}
|
||||
@@ -85,7 +146,7 @@
|
||||
<span style="color: #64748b;">Out of Stock</span>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<span id="stock-{{ card.id }}" class="stock-counter" data-card-id="{{ card.id }}" style="font-size: 0.75rem; color: #94a3b8; margin-left: auto;">...</span>
|
||||
<span id="stock-{{ card.uuid }}" class="stock-counter" data-card-id="{{ card.uuid }}" style="font-size: 0.75rem; color: #94a3b8; margin-left: auto;">...</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@@ -99,7 +160,7 @@
|
||||
{% if page_obj.has_other_pages %}
|
||||
<div style="margin-top: 2rem; display: flex; justify-content: center; gap: 0.5rem;">
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="?page={{ page_obj.previous_page_number }}&game={{ current_game }}&q={{ search_query }}" class="btn"
|
||||
<a href="?page={{ page_obj.previous_page_number }}&game={{ current_game }}&q={{ search_query }}&hide_out_of_stock={{ hide_oos }}" class="btn"
|
||||
style="padding: 0.25rem 0.5rem; font-size: 0.875rem;">Prev</a>
|
||||
{% endif %}
|
||||
|
||||
@@ -109,7 +170,7 @@
|
||||
</span>
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<a href="?page={{ page_obj.next_page_number }}&game={{ current_game }}&q={{ search_query }}" class="btn"
|
||||
<a href="?page={{ page_obj.next_page_number }}&game={{ current_game }}&q={{ search_query }}&hide_out_of_stock={{ hide_oos }}" class="btn"
|
||||
style="padding: 0.25rem 0.5rem; font-size: 0.875rem;">Next</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user