true
11414635283
44888813139
[{"id":262543540320,"handle":"wrx-cat-back-exhaust-2002-2007","title":"2002-2007 Subaru WRX Cat Back Exhaust","updated_at":"2025-09-06T11:12:34-04:00","body_html":"","published_at":"2022-12-21T16:10:54-05:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"WRX_2002-2007"},{"column":"type","relation":"equals","condition":"Exhaust Cat Back"}],"published_scope":"global"},{"id":286645649504,"handle":"2003-subaru-wrx","title":"2003 Subaru WRX Performance Parts","updated_at":"2025-09-06T11:13:29-04:00","body_html":"\u003ch2\u003e2003 Subaru WRX Performance Parts \u0026amp; Modifications\u003c\/h2\u003e\n\u003cp\u003eMaximize your 2003 Subaru WRX with aftermarket parts designed for the GD chassis. The 2003 model offers classic EJ205 performance with extensive modification support.\u003c\/p\u003e\n\u003ch3\u003e2003 WRX Engine Modifications\u003c\/h3\u003e\n\u003cp\u003eThe 2003 WRX's EJ205 2.0L turbocharged engine has proven modification capabilities. Key upgrades include cold air intakes, front-mount intercoolers, and custom tuning maps.\u003c\/p\u003e\n\u003ch3\u003ePopular 2003 WRX Performance Upgrades\u003c\/h3\u003e\n\u003cp\u003eEnhance your 2003 WRX with performance exhausts, coilover suspensions, and big brake kits. The comprehensive aftermarket provides solutions for every performance goal.\u003c\/p\u003e","published_at":"2025-08-28T14:30:37-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"WRX_2002-2007"}],"published_scope":"global"},{"id":286645616736,"handle":"2004-subaru-wrx","title":"2004 Subaru WRX Performance Parts","updated_at":"2025-09-06T11:13:29-04:00","body_html":"\u003ch2\u003e2004 Subaru WRX Performance Parts \u0026amp; Modifications\u003c\/h2\u003e\n\u003cp\u003eUpgrade your 2004 Subaru WRX with proven aftermarket parts for the GD platform. The 2004 model features refined EJ205 performance with established modification paths.\u003c\/p\u003e\n\u003ch3\u003e2004 WRX Engine Modifications\u003c\/h3\u003e\n\u003cp\u003eThe 2004 WRX's EJ205 2.0L turbocharged engine responds well to performance modifications. Popular upgrades include performance intakes, upgraded turbochargers, and engine management tuning.\u003c\/p\u003e\n\u003ch3\u003ePopular 2004 WRX Performance Upgrades\u003c\/h3\u003e\n\u003cp\u003eTransform your 2004 WRX with turbo-back exhaust systems, suspension modifications, and aerodynamic enhancements. The mature aftermarket ensures diverse customization possibilities.\u003c\/p\u003e","published_at":"2025-08-28T14:29:25-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"WRX_2002-2007"}],"published_scope":"global"},{"id":286645583968,"handle":"2005-subaru-wrx","title":"2005 Subaru WRX Performance Parts","updated_at":"2025-09-06T11:13:29-04:00","body_html":"\u003ch2\u003e2005 Subaru WRX Performance Parts \u0026amp; Modifications\u003c\/h2\u003e\n\u003cp\u003eEnhance your 2005 Subaru WRX with performance parts optimized for the GD chassis. The 2005 model offers proven EJ205 reliability with excellent tuning potential.\u003c\/p\u003e\n\u003ch3\u003e2005 WRX Engine Modifications\u003c\/h3\u003e\n\u003cp\u003eThe 2005 WRX's EJ205 2.0L turbocharged engine has extensive modification support. Essential upgrades include turbo upgrades, top-mount intercoolers, and Accessport tuning.\u003c\/p\u003e\n\u003ch3\u003ePopular 2005 WRX Performance Upgrades\u003c\/h3\u003e\n\u003cp\u003eImprove your 2005 WRX with cat-back exhausts, adjustable coilovers, and performance brake components. The established aftermarket provides comprehensive modification options.\u003c\/p\u003e","published_at":"2025-08-28T14:27:50-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"WRX_2002-2007"}],"published_scope":"global"},{"id":286645518432,"handle":"2006-subaru-wrx","title":"2006 Subaru WRX Performance Parts","updated_at":"2025-09-06T11:13:29-04:00","body_html":"\u003ch2\u003e2006 Subaru WRX Performance Parts \u0026amp; Modifications\u003c\/h2\u003e\n\u003cp\u003eUpgrade your 2006 Subaru WRX with quality aftermarket parts designed for the GD platform. The 2006 model introduced the EJ255 engine with increased displacement and torque.\u003c\/p\u003e\n\u003ch3\u003e2006 WRX Engine Modifications\u003c\/h3\u003e\n\u003cp\u003eThe 2006 WRX's EJ255 2.5L turbocharged engine responds excellently to modifications. Key upgrades include cold air intakes, upgraded intercoolers, and professional tuning solutions.\u003c\/p\u003e\n\u003ch3\u003ePopular 2006 WRX Performance Upgrades\u003c\/h3\u003e\n\u003cp\u003eEnhance your 2006 WRX with performance exhaust systems, suspension upgrades, and aerodynamic improvements. The mature platform ensures extensive customization possibilities.\u003c\/p\u003e","published_at":"2025-08-28T14:26:45-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"WRX_2002-2007"}],"published_scope":"global"},{"id":286645452896,"handle":"2007-subaru-wrx","title":"2007 Subaru WRX Performance Parts","updated_at":"2025-09-06T11:13:29-04:00","body_html":"\u003ch2\u003e2007 Subaru WRX Performance Parts \u0026amp; Modifications\u003c\/h2\u003e\n\u003cp\u003eMaximize your 2007 Subaru WRX with proven aftermarket parts for the GD chassis. The 2007 model features the robust EJ255 engine with extensive modification support.\u003c\/p\u003e\n\u003ch3\u003e2007 WRX Engine Modifications\u003c\/h3\u003e\n\u003cp\u003eThe 2007 WRX's EJ255 2.5L turbocharged engine has mature aftermarket support. Popular modifications include upgraded turbochargers, front-mount intercoolers, and standalone engine management.\u003c\/p\u003e\n\u003ch3\u003ePopular 2007 WRX Performance Upgrades\u003c\/h3\u003e\n\u003cp\u003eTransform your 2007 WRX with turbo-back exhausts, coilover suspensions, and big brake kits. The comprehensive aftermarket ensures solutions for every performance need.\u003c\/p\u003e","published_at":"2025-08-28T14:24:17-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"WRX_2002-2007"}],"published_scope":"global"},{"id":278366781536,"handle":"all","title":"All","updated_at":"2025-09-06T11:14:35-04:00","body_html":null,"published_at":"2025-02-10T13:57:36-05:00","sort_order":"alpha-asc","template_suffix":null,"disjunctive":false,"rules":[{"column":"variant_inventory","relation":"greater_than","condition":"-10000"}],"published_scope":"web"},{"id":271134883936,"handle":"best-selling-products","title":"Best Selling Products","updated_at":"2025-09-06T11:14:35-04:00","body_html":null,"published_at":"2024-07-05T23:27:18-04:00","sort_order":"best-selling","template_suffix":null,"disjunctive":true,"rules":[{"column":"title","relation":"contains","condition":"Best Selling"},{"column":"title","relation":"not_contains","condition":"Best Selling"}],"published_scope":"web"},{"id":280610635872,"handle":"buildbux","updated_at":"2025-09-06T11:14:35-04:00","published_at":"2025-03-31T17:34:59-04:00","sort_order":"created-desc","template_suffix":"","published_scope":"global","title":"BuildBUX","body_html":""},{"id":280651530336,"handle":"da","title":"DA","updated_at":"2025-09-06T11:14:35-04:00","body_html":"","published_at":"2025-04-01T11:45:23-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"vendor","relation":"not_equals","condition":"Cobb Tuning"},{"column":"vendor","relation":"not_equals","condition":"ACT"},{"column":"vendor","relation":"not_equals","condition":"IAG"},{"column":"vendor","relation":"not_equals","condition":"Import Image Racing"},{"column":"vendor","relation":"not_equals","condition":"Subaru OEM"},{"column":"vendor","relation":"not_equals","condition":"Radium Engineering"},{"column":"vendor","relation":"not_equals","condition":"Monster-ShipProtect"},{"column":"vendor","relation":"not_equals","condition":"Motul"},{"column":"vendor","relation":"not_equals","condition":"Red Line Oil"}],"published_scope":"web"},{"id":263168786528,"handle":"everything","title":"Everything","updated_at":"2025-09-06T11:14:35-04:00","body_html":"","published_at":"2024-08-27T16:06:31-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":true,"rules":[{"column":"variant_weight","relation":"greater_than","condition":"1"},{"column":"variant_weight","relation":"less_than","condition":"1"}],"published_scope":"web"},{"id":278367338592,"handle":"exhaust-cat-back","title":"Exhaust Cat Back","updated_at":"2025-09-06T11:13:41-04:00","body_html":null,"published_at":"2025-02-10T14:02:32-05:00","sort_order":"best-selling","template_suffix":null,"disjunctive":false,"rules":[{"column":"type","relation":"equals","condition":"Exhaust Cat Back"}],"published_scope":"web"},{"id":411035527,"handle":"invidia","title":"Invidia","updated_at":"2025-09-06T11:13:41-04:00","body_html":"Invidia offers the highest quality exhaust components ranging from cat back exhausts, down pipes, up pipes, and mid pipes.","published_at":"2017-01-24T02:03:00-05:00","sort_order":"alpha-asc","template_suffix":"","disjunctive":false,"rules":[{"column":"vendor","relation":"equals","condition":"Invidia"}],"published_scope":"global","image":{"created_at":"2017-01-27T01:44:57-05:00","alt":"","width":1920,"height":550,"src":"\/\/www.importimageracing.com\/cdn\/shop\/collections\/invidia-collection.jpg?v=1485499497"}},{"id":271134916704,"handle":"newest-products","title":"Newest Products","updated_at":"2025-09-06T11:14:35-04:00","body_html":null,"published_at":"2024-07-05T23:27:19-04:00","sort_order":"created-desc","template_suffix":null,"disjunctive":true,"rules":[{"column":"title","relation":"contains","condition":"Newest"},{"column":"title","relation":"not_contains","condition":"Newest"}],"published_scope":"web"},{"id":261103026272,"handle":"subaru","title":"Subaru","updated_at":"2025-09-06T11:14:35-04:00","body_html":"","published_at":"2021-09-29T17:44:21-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"Vehicle Make_Subaru"}],"published_scope":"global"},{"id":261966954592,"handle":"subaru-sti-1","title":"Subaru STi","updated_at":"2025-09-06T11:13:39-04:00","body_html":"","published_at":"2022-07-21T09:50:17-04:00","sort_order":"best-selling","template_suffix":"vehicle-landing-page","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"Vehicle Model_STI"}],"published_scope":"global"},{"id":261124653152,"handle":"subaru-sti","title":"Subaru STI 2004-2007","updated_at":"2025-09-06T11:13:29-04:00","body_html":"","published_at":"2021-10-04T18:45:35-04:00","sort_order":"best-selling","template_suffix":"vehicle-landing-page","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"STI_2004-2007"}],"published_scope":"global"},{"id":261124620384,"handle":"subaru-wrx","title":"Subaru WRX","updated_at":"2025-09-06T11:14:35-04:00","body_html":"","published_at":"2021-10-04T18:41:48-04:00","sort_order":"best-selling","template_suffix":"vehicle-landing-page","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"Vehicle Model_WRX"}],"published_scope":"global"},{"id":390809223,"handle":"2002-2007-subaru-wrx-sti-parts","title":"Subaru WRX 2002-2007","updated_at":"2025-09-06T11:13:29-04:00","body_html":"\u003cspan class=\"TextRun SCXW123888762\" lang=\"EN-US\" xml:lang=\"EN-US\"\u003e\u003cspan class=\"NormalTextRun SCXW123888762\"\u003eImprove your Subaru today with WRX performance parts from Import Image Racing. We have\u003cspan\u003e \u003c\/span\u003e\u003c\/span\u003e\u003cspan class=\"FindHit SCXW123888762\"\u003e2002\u003c\/span\u003e\u003cspan class=\"NormalTextRun SCXW123888762\"\u003e\u003cspan\u003e \u003c\/span\u003eWRX parts to 2007 WRX parts available for you to customize your car. Ensure that you’re prepared for your next race or car show by adding our aftermarket parts to your vehicle. With our WRX parts, you can\u003cspan\u003e \u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003cspan class=\"TextRun SCXW123888762\" lang=\"EN-US\" xml:lang=\"EN-US\"\u003e\u003cspan class=\"NormalTextRun SCXW123888762\"\u003ebe confident that\u003c\/span\u003e\u003c\/span\u003e\u003cspan class=\"TextRun SCXW123888762\" lang=\"EN-US\" xml:lang=\"EN-US\"\u003e\u003cspan class=\"NormalTextRun SCXW123888762\"\u003e\u003cspan\u003e \u003c\/span\u003eyour Subaru will have a solid advantage over the competition.\u003c\/span\u003e\u003c\/span\u003e","published_at":"2016-10-09T23:03:00-04:00","sort_order":"alpha-asc","template_suffix":"vehicle-landing-page","disjunctive":false,"rules":[{"column":"tag","relation":"equals","condition":"WRX_2002-2007"}],"published_scope":"global"},{"id":286575984736,"handle":"wrx-sti-brz-gr86-performance-parts-sale-import-image-racing","updated_at":"2025-09-06T11:13:41-04:00","published_at":"2025-08-25T17:50:50-04:00","sort_order":"best-selling","template_suffix":"","published_scope":"global","title":"WRX, STI, BRZ \u0026 GR86 Performance Parts Sale | Import Image Racing","body_html":"\u003cstyle\u003e\n .sales-overview-container {\n max-width: 1200px;\n margin: 0 auto;\n padding: 20px;\n font-family: inherit;\n }\n\n .sales-overview-container h1 {\n text-align: center;\n color: inherit;\n margin-bottom: 40px;\n font-size: 2.5em;\n border-bottom: 3px solid #e74c3c;\n padding-bottom: 15px;\n }\n\n .loading-message {\n text-align: center;\n padding: 40px;\n font-size: 1.2em;\n color: #666;\n }\n\n .sale-item {\n background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n color: white;\n border-radius: 15px;\n padding: 25px;\n margin-bottom: 30px;\n box-shadow: 0 8px 25px rgba(0,0,0,0.15);\n }\n\n .sale-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n flex-wrap: wrap;\n }\n\n .sale-title {\n color: #fff;\n margin: 0;\n font-size: 1.8em;\n text-shadow: 2px 2px 4px rgba(0,0,0,0.3);\n }\n\n .sale-countdown {\n background: rgba(231, 76, 60, 0.9);\n color: white;\n padding: 10px 20px;\n border-radius: 25px;\n font-weight: bold;\n box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);\n }\n\n .sale-end-label {\n font-size: 0.9em;\n }\n\n .sale-end-date {\n font-size: 1em;\n }\n\n .sale-products h3 {\n color: #fff;\n margin-bottom: 20px;\n font-size: 1.3em;\n border-bottom: 2px solid rgba(255, 255, 255, 0.3);\n padding-bottom: 10px;\n }\n\n .fitment-section {\n margin-bottom: 25px;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 12px;\n padding: 20px;\n border-left: 4px solid #ffd700;\n }\n\n .fitment-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 15px;\n flex-wrap: wrap;\n gap: 10px;\n }\n\n .fitment-title {\n color: #ffd700;\n margin: 0;\n font-size: 1.2em;\n font-weight: bold;\n text-shadow: 1px 1px 2px rgba(0,0,0,0.3);\n }\n\n .fitment-counts {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n font-size: 0.9em;\n }\n\n .product-count {\n color: rgba(255, 255, 255, 0.9);\n font-weight: 600;\n }\n\n .showing-count {\n color: rgba(255, 255, 255, 0.7);\n font-style: italic;\n font-size: 0.85em;\n }\n\n .product-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\n gap: 15px;\n }\n\n .product-grid-compact {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n gap: 12px;\n margin-bottom: 15px;\n }\n\n .product-card {\n background: rgba(255, 255, 255, 0.1);\n padding: 15px;\n border-radius: 10px;\n border: 1px solid rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(10px);\n transition: transform 0.2s ease, background 0.2s ease;\n }\n\n .product-card-compact {\n background: rgba(255, 255, 255, 0.1);\n padding: 12px;\n border-radius: 10px;\n border: 1px solid rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(10px);\n transition: transform 0.2s ease, background 0.2s ease;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .product-image {\n width: 100%;\n height: 120px;\n overflow: hidden;\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.05);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .product-image img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 6px;\n transition: transform 0.2s ease;\n }\n\n .product-card-compact:hover .product-image img {\n transform: scale(1.05);\n }\n\n .product-card:hover,\n .product-card-compact:hover {\n transform: translateY(-2px);\n background: rgba(255, 255, 255, 0.15);\n }\n\n .view-more-section {\n text-align: center;\n margin-top: 10px;\n }\n\n .view-more-btn {\n display: inline-block;\n background: rgba(255, 215, 0, 0.2);\n color: #ffd700;\n padding: 8px 16px;\n border-radius: 20px;\n text-decoration: none;\n font-weight: 600;\n font-size: 0.9em;\n border: 1px solid rgba(255, 215, 0, 0.3);\n transition: all 0.2s ease;\n }\n\n .view-more-btn:hover {\n background: rgba(255, 215, 0, 0.3);\n color: #fff;\n text-decoration: none;\n transform: translateY(-1px);\n }\n\n .product-link {\n color: #fff;\n text-decoration: none;\n font-weight: 600;\n font-size: 0.9em;\n display: block;\n line-height: 1.3;\n flex-grow: 1;\n }\n\n .product-link:hover {\n text-decoration: underline;\n color: #ffd700;\n }\n\n .product-collection {\n display: block;\n color: #87ceeb;\n font-size: 0.9em;\n text-decoration: none;\n font-style: italic;\n transition: color 0.2s ease;\n }\n\n .product-collection:hover {\n color: #ffd700;\n text-decoration: underline;\n }\n\n .no-sales {\n text-align: center;\n padding: 60px 20px;\n background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n color: white;\n border-radius: 15px;\n box-shadow: 0 8px 25px rgba(0,0,0,0.15);\n }\n\n .no-sales h2 {\n color: #fff;\n margin-bottom: 10px;\n font-size: 2em;\n text-shadow: 2px 2px 4px rgba(0,0,0,0.3);\n }\n\n .no-sales p {\n color: rgba(255, 255, 255, 0.9);\n font-size: 1.1em;\n line-height: 1.5;\n }\n\n @media screen and (max-width: 749px) {\n .sale-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 15px;\n }\n \n .sale-countdown {\n align-self: stretch;\n text-align: center;\n }\n \n .product-grid,\n .product-grid-compact {\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n }\n \n .sales-overview-container h1 {\n font-size: 2em;\n }\n\n .fitment-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 5px;\n }\n\n .fitment-counts {\n align-items: flex-start;\n }\n\n .product-image {\n height: 100px;\n }\n }\n\u003c\/style\u003e\n\n\u003cdiv class=\"sales-overview-container\"\u003e\n \u003ch1\u003eCurrent Sales \u0026amp; Promotions\u003c\/h1\u003e\n \u003cdiv id=\"sales-content\"\u003e\n \u003cdiv class=\"loading-message\"\u003eLoading current sales...\u003c\/div\u003e\n \u003c\/div\u003e\n\u003c\/div\u003e\n\n\u003cscript\u003e\ndocument.addEventListener('DOMContentLoaded', function() {\n const COLLECTION_HANDLE = 'wrx-sti-brz-gr86-performance-parts-sale-import-image-racing';\n const salesContainer = document.getElementById('sales-content');\n \n \/\/ Fetch collection products using handle\n fetch(`\/collections\/${COLLECTION_HANDLE}\/products.json?limit=100`)\n .then(response =\u003e {\n console.log(`Fetching: \/collections\/${COLLECTION_HANDLE}\/products.json`);\n console.log('Response status:', response.status);\n \n if (!response.ok) {\n throw new Error(`HTTP ${response.status}: ${response.statusText}`);\n }\n \n return response.json();\n })\n .then(data =\u003e {\n console.log('API Response:', data);\n console.log('Fetched products:', data.products?.length || 0);\n \n if (data.products \u0026\u0026 data.products.length \u003e 0) {\n \/\/ Debug: Show first few products and their tags\n console.log('First product example:', {\n title: data.products[0].title,\n tags: data.products[0].tags,\n handle: data.products[0].handle\n });\n \n processSalesData(data.products);\n } else {\n console.log('No products found in collection');\n salesContainer.innerHTML = `\n \u003cdiv class=\"no-sales\"\u003e\n \u003ch2\u003e📦 Empty Collection\u003c\/h2\u003e\n \u003cp\u003eNo products found in the specified collection.\u003c\/p\u003e\n \u003cp\u003e\u003csmall\u003eCollection: ${COLLECTION_HANDLE}\u003c\/small\u003e\u003c\/p\u003e\n \u003c\/div\u003e\n `;\n }\n })\n .catch(error =\u003e {\n console.error('Error fetching collection:', error);\n salesContainer.innerHTML = `\n \u003cdiv class=\"no-sales\"\u003e\n \u003ch2\u003e❌ Error Loading Collection\u003c\/h2\u003e\n \u003cp\u003eFailed to load collection: \u003cstrong\u003e${COLLECTION_HANDLE}\u003c\/strong\u003e\u003c\/p\u003e\n \u003cp\u003e\u003csmall\u003eError: ${error.message}\u003cbr\u003eCheck browser console for more details.\u003c\/small\u003e\u003c\/p\u003e\n \u003c\/div\u003e\n `;\n });\n\n function processSalesData(products) {\n const currentDate = new Date();\n const salesData = [];\n \n console.log('Processing', products.length, 'products for sales');\n console.log('Current date:', currentDate);\n \n products.forEach(product =\u003e {\n let saleName = '';\n let saleEnd = '';\n const fitmentTags = [];\n \n \/\/ Debug: Log each product being checked\n console.log(`Checking product: ${product.title}`);\n console.log('Product tags:', product.tags);\n \n \/\/ Check product tags\n product.tags.forEach(tag =\u003e {\n const tagLower = tag.toLowerCase();\n \n if (tagLower.includes('sale:')) {\n saleName = tag.replace(\/sale:\/i, '').trim();\n console.log(`Found sale name: \"${saleName}\" from tag: \"${tag}\"`);\n }\n \n if (tagLower.includes('saleend:')) {\n saleEnd = tag.replace(\/saleend:\/i, '').trim();\n console.log(`Found sale end: \"${saleEnd}\" from tag: \"${tag}\"`);\n }\n \n \/\/ Look for fitment tags\n if (tag.includes('WRX_') || tag.includes('STI_') || tag.includes('BRZ_') || \n tag.includes('FORESTER_') || tag.includes('OUTBACK_') || tag.includes('LEGACY_')) {\n fitmentTags.push(tag);\n }\n });\n \n \/\/ If we found both sale name and end date\n if (saleName \u0026\u0026 saleEnd) {\n console.log(`Product ${product.title} has both sale name and end date`);\n const saleEndDate = new Date(saleEnd);\n console.log(`Sale end date parsed as:`, saleEndDate);\n console.log(`Is sale active? ${saleEndDate \u003e currentDate}`);\n \n \/\/ Only process if sale hasn't ended\n if (saleEndDate \u003e currentDate) {\n console.log(`Adding ${product.title} to active sales`);\n \n \/\/ Get product image - use featured_image or first image\n let productImage = null;\n if (product.featured_image) {\n productImage = product.featured_image;\n } else if (product.images \u0026\u0026 product.images.length \u003e 0) {\n productImage = product.images[0];\n }\n \n \/\/ Debug: Log image info\n console.log(`Product: ${product.title}`);\n console.log('Featured image:', product.featured_image);\n console.log('Featured image type:', typeof product.featured_image);\n console.log('All images:', product.images);\n console.log('First image:', product.images?.[0]);\n console.log('Selected image:', productImage);\n console.log('Selected image type:', typeof productImage);\n \n salesData.push({\n saleName: saleName,\n saleEnd: saleEnd,\n saleEndDate: saleEndDate,\n productTitle: product.title,\n productUrl: `\/products\/${product.handle}`,\n productImage: productImage,\n fitmentTags: fitmentTags,\n collectionTitle: 'Collection',\n collectionUrl: `\/collections\/${COLLECTION_HANDLE}`\n });\n } else {\n console.log(`Sale for ${product.title} has expired`);\n }\n } else {\n if (!saleName) console.log(`No sale name found for ${product.title}`);\n if (!saleEnd) console.log(`No sale end found for ${product.title}`);\n }\n });\n \n console.log('Final sales data:', salesData);\n displaySales(salesData);\n }\n \n function displaySales(salesData) {\n if (salesData.length === 0) {\n salesContainer.innerHTML = `\n \u003cdiv class=\"no-sales\"\u003e\n \u003ch2\u003e🎉 No Active Sales\u003c\/h2\u003e\n \u003cp\u003eCheck back soon for new promotions and deals!\u003c\/p\u003e\n \u003c\/div\u003e\n `;\n return;\n }\n \n \/\/ Group sales by sale name and end date\n const salesGroups = {};\n \n salesData.forEach(item =\u003e {\n const key = `${item.saleName}::${item.saleEnd}`;\n if (!salesGroups[key]) {\n salesGroups[key] = {\n saleName: item.saleName,\n saleEnd: item.saleEnd,\n saleEndDate: item.saleEndDate,\n products: []\n };\n }\n salesGroups[key].products.push(item);\n });\n \n let html = '';\n \n Object.values(salesGroups).forEach(sale =\u003e {\n html += `\n \u003cdiv class=\"sale-item\"\u003e\n \u003cdiv class=\"sale-header\"\u003e\n \u003ch2 class=\"sale-title\"\u003e🏷️ ${sale.saleName}\u003c\/h2\u003e\n \u003cdiv class=\"sale-countdown\"\u003e\n \u003cspan class=\"sale-end-label\"\u003eEnds:\u003c\/span\u003e\n \u003cspan class=\"sale-end-date\" data-end-date=\"${sale.saleEnd}\"\u003e\n ${sale.saleEndDate.toLocaleDateString('en-US', { \n year: 'numeric', \n month: 'long', \n day: 'numeric', \n hour: 'numeric', \n minute: '2-digit',\n hour12: true\n })}\n \u003c\/span\u003e\n \u003c\/div\u003e\n \u003c\/div\u003e\n \n \u003cdiv class=\"sale-products\"\u003e\n \u003ch3\u003eProducts on Sale (Organized by Vehicle Fitment):\u003c\/h3\u003e\n ${generateFitmentSections(sale.products)}\n \u003c\/div\u003e\n \u003c\/div\u003e\n `;\n });\n \n salesContainer.innerHTML = html;\n addCountdownTimers();\n }\n \n function generateFitmentSections(products) {\n \/\/ Group products by fitment\n const fitmentGroups = {};\n \n products.forEach(product =\u003e {\n if (product.fitmentTags.length \u003e 0) {\n product.fitmentTags.forEach(fitment =\u003e {\n if (!fitmentGroups[fitment]) {\n fitmentGroups[fitment] = [];\n }\n fitmentGroups[fitment].push(product);\n });\n } else {\n \/\/ Products without fitment tags go to \"Universal\"\n if (!fitmentGroups['Universal']) {\n fitmentGroups['Universal'] = [];\n }\n fitmentGroups['Universal'].push(product);\n }\n });\n \n let html = '';\n \n \/\/ Sort fitment groups alphabetically\n const sortedFitments = Object.keys(fitmentGroups).sort();\n \n sortedFitments.forEach(fitment =\u003e {\n const displayName = fitment === 'Universal' \n ? '🔧 Universal \/ Multi-Fit'\n : `🚗 ${fitment.replace(\/_\/g, ' ')\n .replace('WRX', 'Subaru WRX')\n .replace('STI', 'Subaru STI')\n .replace('BRZ', 'Subaru BRZ')\n .replace('FORESTER', 'Subaru Forester')\n .replace('OUTBACK', 'Subaru Outback')\n .replace('LEGACY', 'Subaru Legacy')}`;\n \n const allProducts = fitmentGroups[fitment];\n const displayProducts = allProducts.slice(0, 5); \/\/ Show only first 5\n const hasMore = allProducts.length \u003e 5;\n \n html += `\n \u003cdiv class=\"fitment-section\"\u003e\n \u003cdiv class=\"fitment-header\"\u003e\n \u003ch4 class=\"fitment-title\"\u003e${displayName}\u003c\/h4\u003e\n \u003cdiv class=\"fitment-counts\"\u003e\n \u003cspan class=\"product-count\"\u003e${allProducts.length} product${allProducts.length === 1 ? '' : 's'} on sale\u003c\/span\u003e\n ${hasMore ? `\u003cspan class=\"showing-count\"\u003eShowing top 5\u003c\/span\u003e` : ''}\n \u003c\/div\u003e\n \u003c\/div\u003e\n \u003cdiv class=\"product-grid-compact\"\u003e\n `;\n \n displayProducts.forEach(product =\u003e {\n let imageUrl = '';\n \n console.log('Processing product image:', product.productTitle, product.productImage);\n \n if (product.productImage) {\n \/\/ Handle Shopify image object or string\n let imageSrc = '';\n if (typeof product.productImage === 'string') {\n imageSrc = product.productImage;\n console.log('Image is string:', imageSrc);\n } else if (product.productImage.src) {\n imageSrc = product.productImage.src;\n console.log('Image has .src property:', imageSrc);\n } else if (product.productImage.url) {\n imageSrc = product.productImage.url;\n console.log('Image has .url property:', imageSrc);\n } else {\n console.log('Image object structure:', Object.keys(product.productImage));\n }\n \n if (imageSrc) {\n \/\/ Handle Shopify image URL transformation\n if (imageSrc.includes('shopifycdn.com') || imageSrc.includes('shopify.com')) {\n \/\/ For Shopify images, add size transformation\n imageUrl = imageSrc.replace(\/(\\.[^.]*$)\/, '_150x150$1');\n console.log('Transformed Shopify URL:', imageUrl);\n } else {\n \/\/ Use image as-is if it's not a Shopify CDN URL\n imageUrl = imageSrc;\n console.log('Using image as-is:', imageUrl);\n }\n }\n }\n \n \/\/ Use placeholder if no image URL found\n if (!imageUrl) {\n imageUrl = 'data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDE1MCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSIxMjAiIGZpbGw9IiNmNGY0ZjQiLz48dGV4dCB4PSI3NSIgeT0iNjAiIGZpbGw9IiM5OTk5OTkiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZG9taW5hbnQtYmFzZWxpbmU9Im1pZGRsZSI+Tm8gSW1hZ2U8L3RleHQ+PC9zdmc+';\n console.log('Using placeholder image');\n }\n \n html += `\n \u003cdiv class=\"product-card-compact\"\u003e\n \u003cdiv class=\"product-image\"\u003e\n \u003cimg src=\"${imageUrl}\" alt=\"${product.productTitle}\" loading=\"lazy\" onerror=\"this.src='data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDE1MCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjE1MCIgaGVpZ2h0PSIxMjAiIGZpbGw9IiNmNGY0ZjQiLz48dGV4dCB4PSI3NSIgeT0iNjAiIGZpbGw9IiM5OTk5OTkiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZG9taW5hbnQtYmFzZWxpbmU9Im1pZGRsZSI+Tm8gSW1hZ2U8L3RleHQ+PC9zdmc+';\"\u003e\n \u003c\/div\u003e\n \u003ca href=\"${product.productUrl}\" class=\"product-link\"\u003e\n \u003cstrong\u003e${product.productTitle}\u003c\/strong\u003e\n \u003c\/a\u003e\n \u003c\/div\u003e\n `;\n });\n \n html += `\n \u003c\/div\u003e\n `;\n \n \/\/ Add \"View More\" button if there are more products\n if (hasMore) {\n const filterTag = fitment !== 'Universal' ? fitment : '';\n const viewMoreUrl = filterTag \n ? `${fitmentGroups[fitment][0].collectionUrl}?constraint=${encodeURIComponent(filterTag)}`\n : fitmentGroups[fitment][0].collectionUrl;\n \n html += `\n \u003cdiv class=\"view-more-section\"\u003e\n \u003ca href=\"${viewMoreUrl}\" class=\"view-more-btn\"\u003e\n View All ${allProducts.length} ${displayName.replace(\/🚗|🔧\/, '').trim()} Products →\n \u003c\/a\u003e\n \u003c\/div\u003e\n `;\n }\n \n html += `\n \u003c\/div\u003e\n `;\n });\n \n return html;\n }\n \n function addCountdownTimers() {\n const saleEndElements = document.querySelectorAll('.sale-end-date');\n \n saleEndElements.forEach(function(element) {\n const endDateStr = element.getAttribute('data-end-date');\n const endDate = new Date(endDateStr);\n const now = new Date();\n \n if (endDate \u003e now) {\n const timeDiff = endDate - now;\n const days = Math.floor(timeDiff \/ (1000 * 60 * 60 * 24));\n const hours = Math.floor((timeDiff % (1000 * 60 * 60 * 24)) \/ (1000 * 60 * 60));\n const minutes = Math.floor((timeDiff % (1000 * 60 * 60)) \/ (1000 * 60));\n \n let countdown = '';\n if (days \u003e 0) {\n countdown = ` \u003csmall style=\"display: block; margin-top: 5px;\"\u003e(${days}d ${hours}h ${minutes}m left)\u003c\/small\u003e`;\n } else if (hours \u003e 0) {\n countdown = ` \u003csmall style=\"display: block; margin-top: 5px;\"\u003e(${hours}h ${minutes}m left)\u003c\/small\u003e`;\n } else if (minutes \u003e 0) {\n countdown = ` \u003csmall style=\"display: block; margin-top: 5px;\"\u003e(${minutes} minutes left!)\u003c\/small\u003e`;\n } else {\n countdown = ` \u003csmall style=\"display: block; margin-top: 5px; color: #ffd700;\"\u003e(ENDING NOW!)\u003c\/small\u003e`;\n }\n \n element.innerHTML += countdown;\n }\n });\n }\n});\n\u003c\/script\u003e"}]
import-image-racing.myshopify.com
[{"id":44888813139,"title":"Default Title","option1":"Default Title","option2":null,"option3":null,"sku":"invHS02SW1GRT","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Invidia N1 Racing Titanium Tip Cat Back Exhaust Subaru WRX \/ STI 2002-2007 | HS02SW1GRT","public_title":null,"options":["Default Title"],"price":69599,"weight":18144,"compare_at_price":106748,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"continue","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]