// ==================== IMMEDIATE CSS INJECTION ==================== // Hide Wix color pickers IMMEDIATELY to prevent flash // ==================== CONFIGURATION ==================== // Session storage keys // Get instanceId from Wix Blocks parameters // Product config cache (in-memory) // Global settings cache // ==================== SESSION STORAGE ==================== // ==================== GLOBAL SETTINGS ==================== // ==================== USER VERIFICATION ==================== // Restore Wix pickers if user is not verified // ==================== PRODUCT CONFIG ==================== // Merge with global settings // ==================== DOM MANIPULATION ==================== // Find the Wix product options container // โœ… FIXED: Find ALL color variant groups (each with unique name) // Find all top-level repeater items (these are the variant groups like "Color", "color") // Get direct children repeater items (variant groups) // Find the variant name (title) // Find all radio inputs within THIS group only // Create a color swatch element // Size mapping // Shape // Get color value // Handle different color types // Hover effects // Click handler // Create variant title element // Inject custom color picker for a variant // Create wrapper container // Add title // Create custom picker container // Find default/selected color from SPO config // Also check which Wix color is currently selected // Add color swatches // Check if this SPO color matches the selected Wix color // Update visual selection // Find and click the original Wix radio button // Dispatch custom event // Insert custom picker BEFORE the Wix variant container, then hide it // ==================== MAIN HANDLER ==================== // Validate productId format // Step 1: Verify user return; // restoreWixPickers already called in verifyUser // Step 2: Get product config from CMS // Step 3: Wait for DOM and inject // Find ALL Wix color variant groups // Match and inject for each SPO variant // Find matching Wix variant group by EXACT name match first // If no exact match, try partial match (but only if not already used) matchingWixGroup.used = true; // Mark as used to prevent double-matching // Remove the immediate hide style since we've injected our pickers // Add global CSS styles // ==================== PRODUCT ID EXTRACTION ==================== // Method 1: Check Wix global state // Method 2: Check window.__PRODUCT_PAGE_DATA__ // Method 3: Check for product ID in page data (LD+JSON) // Method 4: Check URL for product ID patterns // Method 5: Look for product ID in any data attribute // Method 6: Check for hidden inputs // Track if we've already processed this product // ==================== INITIALIZATION ==================== // Validate instanceId // Register Wix analytics event listeners // ProductPageLoaded event // ViewContent event (Wix Stores tracking pixel) // Fallback: If we're already on a product page, try to extract productId // Wait for page to fully load // Try again after more time // Not on a product page, don't hide anything // Start when DOM is ready
top of page

ื‘ื™ื˜ื•ืœื™ื ื•ื”ื—ื–ืจื•ืช \ ืžื“ื™ื ื™ื•ืช ืžืฉืœื•ื—ื™ื

1. ืืกืคืงื” ื•ืžืฉืœื•ื—ื™ื

1.1 ื–ืžืŸ ื˜ื™ืคื•ืœ ื‘ื”ื–ืžื ื” ื”ื•ื ืขื“ 3–5 ื™ืžื™ ืขืกืงื™ื ืžืจื’ืข ืื™ืฉื•ืจ ื”ื”ื–ืžื ื” ื•ื”ืชืฉืœื•ื, ืœื ื›ื•ืœืœ ื™ืžื™ ืฉื™ืฉื™, ืฉื‘ืช, ื—ื’ื™ื, ืขืจื‘ื™ ื—ื’ ืื• ื”ืฉืงื•ืช ืžื™ื•ื—ื“ื•ืช.
1.2 ื”ืžืฉืœื•ื—ื™ื ืžืชื‘ืฆืขื™ื ื‘ืืžืฆืขื•ืช ื—ื‘ืจืช ืฉืœื™ื—ื•ื™ื•ืช ืœื›ืชื•ื‘ืช ืฉื ืžืกืจื” ืขืดื™ ื”ืœืงื•ื—ื”.
1.3 ื‘ืžื•ืขื“ื™ื ืžื™ื•ื—ื“ื™ื (ืžื›ื™ืจื•ืช ืกื•ืฃ ืขื•ื ื”, ื—ื’ื™ื, ื—ื™ืกื•ืœื™ื) ื™ื™ืชื›ื ื• ืขื™ื›ื•ื‘ื™ื ืฉืœ ืขื“ 7 ื™ืžื™ ืขืกืงื™ื.
1.4 ื™ื™ืชื›ื ื• ืขื™ื›ื•ื‘ื™ื ื ื•ืกืคื™ื ื‘ืžืงืจื™ื ืฉืื™ื ื ื‘ืฉืœื™ื˜ืช ื”ื—ื‘ืจื” ื›ื’ื•ืŸ: ืžื–ื’ ืื•ื•ื™ืจ ืงื™ืฆื•ื ื™, ืื–ื•ืจื™ ืฉืœื™ื—ื•ืช ืžืจื•ื—ืงื™ื, ืขื•ืžืก ื—ืจื™ื’, ืžืฆื‘ ื‘ื˜ื—ื•ื ื™ (ืœืจื‘ื•ืช ื™ืžื™ ืžืœื—ืžื”, ืกื’ืจื™ื, ืฉื‘ื™ืชื•ืช, ื•ื›ื•ื— ืขืœื™ื•ืŸ).
1.5 ื”ื—ื‘ืจื” ืœื ืื—ืจืื™ืช ืœืื™ื—ื•ืจ ื‘ืืกืคืงื” ืขืงื‘ ื˜ืขื•ืช ื‘ืคืจื˜ื™ ื”ืœืงื•ื—ื” ืื• ืื™ ื–ืžื™ื ื•ืชื” ืœืงื‘ืœืช ื”ื”ื–ืžื ื”.

โธป

2. ื‘ื™ื˜ื•ืœื™ื, ื”ื—ื–ืจื•ืช ื•ื”ื—ืœืคื•ืช

2.1 ื ื™ืชืŸ ืœื‘ื˜ืœ ืขืกืงื” ื•ืœืงื‘ืœ ื”ื—ื–ืจ ื›ืกืคื™ ืชื•ืš 14 ื™ืžื™ื ืžื™ื•ื ืงื‘ืœืช ื”ืžื•ืฆืจ, ื‘ื”ืชืื ืœื—ื•ืง ื”ื’ื ืช ื”ืฆืจื›ืŸ.
2.2 ื”ื—ื–ืจ ื›ืกืคื™ ื™ื™ื ืชืŸ ื‘ื ื™ื›ื•ื™ 5% ืื• 100 ืฉ”ื— – ืœืคื™ ื”ื ืžื•ืš ืžื‘ื™ื ื™ื”ื.
2.3 ืคืจื™ื˜ื™ื ื™ืชืงื‘ืœื• ื—ื–ืจื” ืจืง ืื ืœื ื ืขืฉื” ื‘ื”ื ืฉื™ืžื•ืฉ, ืœื ื ืฉื˜ืคื•, ืขื ืชื’ื™ื•ืช ืžืงื•ืจื™ื•ืช ื•ืžื“ื‘ืงืช ื”ื™ื’ื™ื™ื ื” ืœื ืžื•ืกืจืช.
2.4 ื”ืœืงื•ื—ื” ืจืฉืื™ืช ืœื‘ื—ื•ืจ ื‘ืงื‘ืœืช ืงืจื“ื™ื˜ ืœืฉื™ืžื•ืฉ ื‘ืืชืจ ื‘ืžืงื•ื ื”ื—ื–ืจ ื›ืกืคื™.
2.5 ืžื•ืฆืจื™ื ืฉื™ื•ืฆืจื• ื‘ื”ืชืืžื” ืื™ืฉื™ืช ืœื ื™ื•ื›ืœื• ืœืฉืžืฉ ืœื”ื—ื–ืจื” ืื• ื”ื—ืœืคื”.
2.6 ื”ื—ื‘ืจื” ืจืฉืื™ืช ืœื“ื—ื•ืช ืื• ืœื ืœืืฉืจ ื”ื—ื–ืจื”/ื”ื—ืœืคื” ืื ื”ืžื•ืฆืจ ื”ื•ื—ื–ืจ ื‘ื ื™ื’ื•ื“ ืœืชื ืื™ื ื”ืžืคื•ืจื˜ื™ื ืœืขื™ืœ.

2.7 ื‘ืžืงืจื” ืฉืœ ื”ื—ื–ืจื” ืื• ื”ื—ืœืคืช ืžื•ืฆืจ, ืขืœ ื”ืœืงื•ื—ื” ืœื”ื—ื–ื™ืจ ืืช ื”ืžื•ืฆืจ ืœืกื˜ื•ื“ื™ื• ื”ื—ื‘ืจื” ืื• ืœืฉืœื•ื— ืื•ืชื• ื‘ืืžืฆืขื•ืช ืžืฉืœื•ื— ืขืœ ื—ืฉื‘ื•ื ื”. ื ื™ืชืŸ ืœื”ืฉืชืžืฉ ื‘ืฉื™ืจื•ืช ืžืฉืœื•ื—ื™ื ืžื˜ืขื ื”ื—ื‘ืจื” ื‘ืขืœื•ืช ืฉืœ 35 ืฉืดื—.

bottom of page