Top 5 Sellers

  • #1 Bobby
    Average Rating: 5 / 5
    1 reviews
  • #2 Hermes Heaven
    Average Rating: 5 / 5
    1 reviews
  • #3 Society of Chanel
    Average Rating: 4.5 / 5
    6 reviews
  • #4 Uncle Bench
    Average Rating: 4 / 5
    1 reviews

Main category

Newbie Guide - Start Here!

New to All Reps? Learn more about us here.

Trending content

Members online

No members online now.

Forum statistics

Threads
15
Messages
15
Members
1
Latest member
all_rad
Back
Top
document.addEventListener('DOMContentLoaded', function () { const brandField = document.querySelector('[name="custom_fields[brand_reviewed]"]'); const itemField = document.querySelector('[name="custom_fields[item_type]"]'); let modelField = document.querySelector('[name="custom_fields[model_name]"]'); const nodeId = parseInt(document.body.dataset.nodeId || '0'); const brandMapByNodeId = { 13: 'chanel', 14: 'hermes', 15: 'louis_vuitton', 16: 'gucci', 17: 'prada', 18: 'dior', 19: 'celine', 20: 'balenciaga', 21: 'ysl', 22: 'fendi', 23: 'burberry', 24: 'loewe', 25: 'goyard', 26: 'bottega_veneta', 27: 'mcm', 28: 'valentino', 29: 'givenchy', 30: 'versace', 31: 'miu_miu', 32: 'chloe' }; if (!brandField || !itemField || !modelField) { console.warn("Missing one or more fields:", { brandField, itemField, modelField }); return; } // Autofill and lock brand field const brandSlug = brandMapByNodeId[nodeId]; if (brandSlug) { brandField.value = brandSlug; brandField.disabled = true; brandField.style.pointerEvents = 'none'; brandField.style.opacity = '0'; brandField.style.position = 'absolute'; brandField.style.left = '-9999px'; const wrapper = brandField.closest('dl'); if (wrapper) wrapper.style.display = 'none'; } // Insert item type placeholder if nothing selected if (itemField.tagName === 'SELECT' && itemField.value === '') { const defaultOption = document.createElement('option'); defaultOption.value = ''; defaultOption.textContent = '-- Select item type --'; defaultOption.disabled = true; defaultOption.selected = true; itemField.insertBefore(defaultOption, itemField.firstChild); } // ✅ NOW create and replace model field const selectEl = document.createElement('select'); selectEl.name = modelField.name; selectEl.className = 'input'; modelField.parentNode.replaceChild(selectEl, modelField); modelField = selectEl; const modelMap = { 'hermes': { 'bag': ['Birkin', 'Kelly', 'Constance', 'Evelyne', 'Picotin'], 'shoes': ['Oran Sandals', 'Jumping Boots'], 'accessories': ['Twilly Scarf', 'Belt H Buckle'] }, 'chanel': { 'bag': ['Classic Flap', 'Boy Bag', 'Gabrielle', 'Wallet on Chain'], 'shoes': ['Ballet Flats', 'Slingbacks'], 'jewelry': ['Coco Crush Ring', 'Camellia Earrings'] }, 'louis_vuitton': { 'bag': ['Neverfull', 'Speedy', 'Alma', 'Capucines'], 'shoes': ['Archlight Sneaker', 'Run Away Sneaker'], 'accessories': ['Monogram Scarf', 'LV Belt'] }, 'gucci': { 'bag': ['Marmont', 'Dionysus', 'Jackie 1961'], 'shoes': ['Ace Sneakers', 'Horsebit Loafers'], 'accessories': ['Gucci Belt', 'Silk Scarf'] }, 'dior': { 'bag': ['Lady Dior', 'Book Tote', 'Saddle Bag'], 'shoes': ['J’Adior Slingback', 'D-Connect Sneaker'], 'accessories': ['Oblique Scarf'] } }; function updateModels() { const brand = brandField.value.toLowerCase(); const item = itemField.value.toLowerCase(); modelField.innerHTML = ''; if (modelMap[brand] && modelMap[brand][item]) { const models = modelMap[brand][item]; modelField.innerHTML = ''; models.forEach(model => { const opt = document.createElement('option'); opt.value = model.toLowerCase().replace(/\s+/g, '_'); opt.textContent = model; modelField.appendChild(opt); }); } else { modelField.innerHTML = ''; } } itemField.addEventListener('change', updateModels); updateModels(); }); --- Let me know once you've replaced the old version with this — we’ll confirm it’s fully working and fix any stragglers if needed.