function ramProductsInit(){ let RAM_ID = ''; async function init(){ let id if(location.search==''&&(location.href.includes('laptops')||location.href.includes('allinones'))){ id = await getallproductsFun(); }else{ id = await getProductIdService(); } getRamData(id) } async function getProductsIds(nameArr){ let resData = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/getallproducts`,true); if(resData.isError){ toasterHelper("error","Something went wrong!") return; } let res = resData.response; res = JSON.parse(res.result); let ids = []; for(let i=0;i{ if(currName === item.productname){ return item.productid; } }) if(id){ ids.push(id); } } return ids; } async function getallproductsFun(){ let laptopStr = ['FYRO Flagship','Zeno Dualbook','Zeno Sleekbook']; let allInOnesStr = ['AIO Zeno','AIO Fyro']; let name = window.location.href; name = name.includes('laptops') ?laptopStr : allInOnesStr; const ids = await getProductsIds(name); console.log(ids); return ids; } function getProductIdService(){ return new Promise(async (reslove,reject)=>{ let resData =await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/getallproducts`,true); if(resData.isError){ alert(resData.errorMsg.message); return; } let res = resData.response; res = JSON.parse(res.result); console.log(res); let searchName = window.location.search.split('?')[1]; let urlPathName = window.location.pathname; let searchTerm = ''; if(urlPathName.includes('ram')){ searchTerm = "RAM ORA"; }else if(urlPathName.includes('storage')){ searchTerm = `SSD ORA`; }else{ searchTerm = searchName.replaceAll('%20',' '); } let resultItem = []; if(searchTerm.toLowerCase() === 'zeno'){ for(let i=0;i
${itemname}
  • i3 / 15 / i7
  • ${gb}
    ${ramTech}
  • ${pricelist?priceAmt:'Coming Soon'}
` return `
${itemname}
  • ${gb}
    ${ramTech}
  • ${priceAmt}
`; //abhi anna design return `

${itemname}


${gb}
${ramTech}
${priceAmt}
`; return `
...
  • ${gb} ${ramTech}
  • 3200 Mhz
Details
` } init(); } ramProductsInit();