{"product_id":"superatv-skid-plate-pol-fsppran900-fsppran900","title":"SuperATV Skid Plate POL (FSPPRAN900)","description":"SUPERATV SKID PLATE POL (FSPPRAN900)\n\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\njustify-content: center;\nalign-items: center;\nmax-width: 100%;\n\"\u003e\n\u003ch3\u003eFitment Lookup\u003c\/h3\u003e\n\u003cform id=\"FITMENT_FORM\" style=\"\ndisplay: flex;\nflex-wrap: wrap;\njustify-content: center;\nmax-width: 80%;\nwidth: 80%;\nmin-width: 8rem;\nmax-width: 24rem;\n\"\u003e\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\npadding: 1rem 0 1rem 0;\nmax-width: 100%;\nwidth: 100%;\n\"\u003e\n\u003clabel for=\"FITMENT_BRAND\" style=\"padding-bottom: 0.25rem\"\u003eBRAND\u003c\/label\u003e\n\u003cselect id=\"FITMENT_BRAND\" style=\"white-space: nowrap; text-overflow: ellipsis\"\u003e\n\u003coption value=\"default\" selected disabled hidden\u003e\nSELECT BRAND\n\u003c\/option\u003e\n\u003c\/select\u003e\n\u003c\/div\u003e\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\npadding: 1rem 0 1rem 0;\nmax-width: 100%;\nwidth: 100%;\n\"\u003e\n\u003clabel for=\"FITMENT_MODEL\" style=\"padding-bottom: 0.25rem\"\u003eMODEL\u003c\/label\u003e\n\u003cselect id=\"FITMENT_MODEL\" style=\"white-space: nowrap; text-overflow: ellipsis\" disabled\u003e\n\u003coption value=\"default\" selected disabled hidden\u003e\nSELECT MODEL\n\u003c\/option\u003e\n\u003c\/select\u003e\n\u003c\/div\u003e\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\npadding: 1rem 0 1rem 0;\nmax-width: 100%;\nwidth: 100%;\n\"\u003e\n\u003clabel for=\"FITMENT_YEAR\" style=\"padding-bottom: 0.25rem\"\u003eYEAR\u003c\/label\u003e\n\u003cselect id=\"FITMENT_YEAR\" style=\"white-space: nowrap; text-overflow: ellipsis\" disabled\u003e\n\u003coption value=\"default\" selected disabled hidden\u003e\nSELECT YEAR\n\u003c\/option\u003e\n\u003c\/select\u003e\n\u003c\/div\u003e\n\u003c\/form\u003e\n\u003cdiv style=\"\ndisplay: flex;\nflex-direction: column;\nalign-items: center;\nmargin: 0.5rem;\n\"\u003e\n\u003ch4\u003eFitments:\u003c\/h4\u003e\n\u003ctable id=\"FITMENT_TABLE\"\u003e\u003c\/table\u003e\n\u003cdiv id=\"FITMENT_NOTES\" style=\"\ndisplay: flex;\nflex-direction: column;\nalign-items: center;\nmargin-top: 0.5rem;\n\"\u003e\n\u003cspan id=\"FITMENT_MESSAGE\" style=\"margin-top: 0.5rem; margin-bottom: 0.5rem\"\u003eSelect Brand, Model, and Year To Check Fitment For Current\nProduct\u003c\/span\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003chr style=\"\nborder-top: 3px solid #ddd;\nwidth: 100%;\nmax-width: 32rem;\nmargin-top: 0.5rem;\nmargin-bottom: 0.5rem;\n\"\u003e\n\u003cspan style=\"\nmax-width: 32rem;\nfont-style: italic;\nfont-weight: 100;\npadding: 1rem;\n\"\u003e\u003cb\u003eDisclaimer:\u003c\/b\u003e Fitment information is based on third-party data and\nmay not be accurate. Other fitments may be available but are not shown\ndue to limited data. Verify with your vehicle's manufacturer or a\nprofessional before making any changes. We are not responsible for\nerrors or actions taken based on this information.\n\u003c\/span\u003e\n\u003c\/div\u003e\n\u003cscript\u003e\nconst fitments = [{\"m\":\"Ranger 570 XP\",\"b\":0,\"y\":{\"3\":{\"-1\":[\"FSPPRAN900|\"]}}},{\"m\":\"Ranger 570 XP EPS\",\"b\":0,\"y\":{\"3\":{\"-1\":[\"FSPPRAN900|\"]}}},{\"m\":\"Ranger 900 XP\",\"b\":0,\"y\":{\"0\":{\"-1\":[\"FSPPRAN900|\"]},\"1\":{\"-1\":[\"FSPPRAN900|\"]},\"2\":{\"-1\":[\"FSPPRAN900|\"]},\"3\":{\"-1\":[\"FSPPRAN900|\"]},\"4\":{\"-1\":[\"FSPPRAN900|\"]},\"5\":{\"-1\":[\"FSPPRAN900|\"]},\"6\":{\"-1\":[\"FSPPRAN900|\"]}}},{\"m\":\"Ranger 900 XP EPS\",\"b\":0,\"y\":{\"0\":{\"-1\":[\"FSPPRAN900|\"]},\"1\":{\"-1\":[\"FSPPRAN900|\"]},\"2\":{\"-1\":[\"FSPPRAN900|\"]},\"3\":{\"-1\":[\"FSPPRAN900|\"]},\"4\":{\"-1\":[\"FSPPRAN900|\"]},\"5\":{\"-1\":[\"FSPPRAN900|\"]},\"6\":{\"-1\":[\"FSPPRAN900|\"]}}},{\"m\":\"Ranger Diesel\",\"b\":0,\"y\":{\"2\":{\"-1\":[\"FSPPRAN900|\"]},\"3\":{\"-1\":[\"FSPPRAN900|\"]},\"4\":{\"-1\":[\"FSPPRAN900|\"]},\"5\":{\"-1\":[\"FSPPRAN900|\"]}}},{\"m\":\"Ranger XP 1000\",\"b\":0,\"y\":{\"4\":{\"-1\":[\"FSPPRAN900|\"]}}},{\"m\":\"Ranger XP 1000 EPS\",\"b\":0,\"y\":{\"4\":{\"-1\":[\"FSPPRAN900|\"]}}},{\"m\":\"Ranger XP 1000 High Lifter EPS\",\"b\":0,\"y\":{\"4\":{\"0\":[\"FSPPRAN900|\"]},\"5\":{\"-1\":[\"FSPPRAN900|\"]}}}]\nconst brands = [\"POLARIS\"]\nconst notes = [\"Cannot install rear section of skid plate\"]\nconst years = [2013,2014,2015,2016,2017,2018,2019]\nconst options = []\nconst brandSelector = document.getElementById('FITMENT_BRAND')\nconst modelSelector = document.getElementById('FITMENT_MODEL')\nconst yearSelector = document.getElementById('FITMENT_YEAR')\nconst form = document.getElementById('FITMENT_FORM')\nconst table = document.getElementById('FITMENT_TABLE')\nconst notesDiv = document.getElementById('FITMENT_NOTES')\nconst _sBrands = [...brands].sort((a, b) =\u003e (a \u003e b ? 1 : a \u003c b ? -1 : 0))\nconst _sModels = []\nconst _sYears = [...years].sort()\nfitments.forEach((fitment, index) =\u003e {\nif (!_sModels.includes(fitment.m)) {\n_sModels.push(fitment.m)\nconst option = document.createElement('option')\noption.innerHTML = fitment.m\noption.value = fitment.m\noption.title = fitment.m\noption.hidden = true\nmodelSelector.appendChild(option)\n}\n})\n_sBrands.forEach((brand) =\u003e {\nconst option = document.createElement('option')\noption.innerHTML = brand\noption.value = brand\noption.title = brand\nconst foundIndex = brands.findIndex((_brand) =\u003e brand === _brand)\noption.dataset['index'] = foundIndex\nbrandSelector.appendChild(option)\n})\n_sYears.forEach((year) =\u003e {\nconst option = document.createElement('option')\noption.innerHTML = year\noption.value = year\noption.hidden = true\noption.title = year\nconst foundIndex = years.findIndex((_year) =\u003e year === _year)\noption.dataset['index'] = foundIndex\nyearSelector.appendChild(option)\n})\n_sBrands.splice(0, _sBrands.length)\n_sModels.splice(0, _sModels.length)\n_sYears.splice(0, _sYears.length)\n\nlet currentBrand\nlet currentModel\nlet currentYear\n\nconst resetState = (state) =\u003e {\nif (state === 'all') {\nmodelSelector.value = 'default'\nmodelSelector.disabled = false\ncurrentModel = undefined\n}\nyearSelector.value = 'default'\nyearSelector.disabled = true\ncurrentYear = undefined\ncleanMessages()\ncreateMessage('Select Brand, Model, and Year To Find Fitment For Product')\ncleanFitmentTable()\n}\n\nconst updateModels = () =\u003e {\nconst newFitmentLookup = fitments.filter((fitment) =\u003e {\nreturn fitment.b === currentBrand\n})\nmodelSelector.querySelectorAll('option')?.forEach((option, index) =\u003e {\nif (index === 0 || option.innerHTML.trim() === 'SELECT MODEL') return\noption.remove()\n})\nnewFitmentLookup.forEach((fitment) =\u003e {\nconst option = document.createElement('option')\noption.style.wordBreak = ''\noption.innerHTML = fitment.m\noption.value = fitment.m\noption.title = fitment.m\nmodelSelector.appendChild(option)\n})\nresetState('all')\n}\n\nconst updateYears = () =\u003e {\nconst newFitment = fitments.find((fitment) =\u003e {\nreturn fitment.b === currentBrand \u0026\u0026 fitment.m === currentModel\n})\n\nyearSelector.querySelectorAll('option')?.forEach((option) =\u003e {\nconst foundYear = newFitment.y[option.dataset['index']]\nif (foundYear) {\noption.hidden = false\n} else {\noption.hidden = true\n}\n})\nresetState()\nyearSelector.disabled = false\n}\n\nconst createMessage = (text, note) =\u003e {\nconst span = document.createElement('span')\nspan.innerHTML = text\nspan.style.marginTop = '0.5rem'\nspan.style.marginBottom = '0.5rem'\nif (note) {\nspan.style.fontWeight = 'bold'\nspan.style.fontStyle = 'italic'\n}\nnotesDiv.appendChild(span)\n}\n\nconst cleanMessages = () =\u003e {\nconst messages = notesDiv.querySelectorAll('span')\nmessages.forEach((message) =\u003e message.remove())\n}\n\nconst cleanFitmentTable = () =\u003e {\nconst rows = table.querySelectorAll('tr')\nrows.forEach((row) =\u003e row.remove())\n}\n\nconst createFitmentHeaders = () =\u003e {\nconst row = document.createElement('tr')\ntable.appendChild(row)\nconst tableHeader = document.createElement('th')\ntableHeader.innerHTML = 'SKU | OPTION(s)'\nrow.appendChild(tableHeader)\n}\n\nconst createFitmentRow = (text) =\u003e {\nconst row = document.createElement('tr')\ntable.appendChild(row)\nconst tableHeader = document.createElement('td')\ntableHeader.innerHTML = text\nrow.appendChild(tableHeader)\n}\n\nconst showFitments = () =\u003e {\nconst fitment = fitments.find((fitment) =\u003e fitment.b === currentBrand \u0026\u0026 fitment.m === currentModel)?.y?.[currentYear]\ncleanFitmentTable()\n\nif (!fitment) {\ncleanMessages()\ncreateMessage('No Fitments Found For This Current Product')\nreturn\n}\ncleanMessages()\ncreateFitmentHeaders()\nconst currentNotes = []\nconst currentFitments = []\nfor (noteKey in fitment) {\nconst note = notes[noteKey]\nlet notePosition\nif (note) notePosition = currentNotes.push(note)\n\nfitment[noteKey]\n.sort((a, b) =\u003e (a \u003e b ? 1 : a \u003c b ? -1 : 0))\n.forEach((sku) =\u003e {\nconst manufacturerSKU = sku.split('|')[0]\nconst optionString = options?.[sku.split('|')?.[1]]\nconst text = notePosition\n? `${manufacturerSKU}${'*'.repeat(notePosition)}${optionString ? ` | ${optionString}` : ''}`\n: `${manufacturerSKU}${optionString ? ` | ${optionString}` : ''}`\ncreateFitmentRow(text)\n})\n}\ncurrentNotes.forEach((note, index) =\u003e {\ncreateMessage(`${'*'.repeat(index + 1)} ${note}`, true)\n})\n}\n\nform.addEventListener('change', (event) =\u003e {\nswitch (event.target.id) {\ncase 'FITMENT_BRAND':\ncurrentBrand = Number(event.target.options[event.target.selectedIndex]?.dataset['index'])\nbrandSelector.title = brands[currentBrand]\nupdateModels()\nbreak\ncase 'FITMENT_MODEL':\ncurrentModel = event.target.value\nmodelSelector.title = event.target.value\nupdateYears()\nbreak\ncase 'FITMENT_YEAR':\ncurrentYear = Number(event.target.options[event.target.selectedIndex]?.dataset['index'])\nyearSelector.title = years[currentYear]\nshowFitments()\nbreak\ndefault:\nconsole.error('ERROR')\n}\n})\n\u003c\/script\u003e\n","brand":"SuperATV","offers":[{"title":"Default Title","offer_id":40647349272622,"sku":"FSPPRAN900","price":1492.99,"currency_code":"CAD","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0251\/9659\/3198\/files\/superatv-skid-plate-pol-fsppran900driven-powersports-incfsppran9009999999988-871920.jpg?v=1735736220","url":"https:\/\/www.drivenpowersports.ca\/fr\/products\/superatv-skid-plate-pol-fsppran900-fsppran900","provider":"Driven Powersports Inc.","version":"1.0","type":"link"}