diff --git a/dist/Js/auth/login.js b/dist/Js/auth/login.js index dbec7be..912ece6 100644 --- a/dist/Js/auth/login.js +++ b/dist/Js/auth/login.js @@ -275,6 +275,12 @@ function initLogin() { window.localStorage.setItem("Useremail", userEmail); //window.localStorage.setItem("Userpassword", userPassword); window.localStorage.setItem("isaccountCreated", true); + const isCartAdded = localStorage.getItem(CART_ADD); + if(isCartAdded){ + localStorage.removeItem(CART_ADD); + window.location.href = `/selectdelivery.html`; + return; + } window.location.href = `./index.html`; } else { // toasterOpts(); diff --git a/dist/Js/navbar.js b/dist/Js/navbar.js index 8f3b766..4ccf338 100644 --- a/dist/Js/navbar.js +++ b/dist/Js/navbar.js @@ -30,7 +30,7 @@ let nav_html = `
diff --git a/dist/Js/navbar1.js b/dist/Js/navbar1.js index 0d26dab..cefacf8 100644 --- a/dist/Js/navbar1.js +++ b/dist/Js/navbar1.js @@ -29,7 +29,7 @@ let nav_html = ` diff --git a/dist/Js/productdetails/productdetails.js b/dist/Js/productdetails/productdetails.js index 16a8200..b06107b 100644 --- a/dist/Js/productdetails/productdetails.js +++ b/dist/Js/productdetails/productdetails.js @@ -1,5 +1,9 @@ function startDetails(){ // http://127.0.0.1:5502/productdetails.html?productId=106633230000024 + if(window.location.search.split('=')[0] == ''){ + window.location.href = "/notfound.html"; + return; + } let productId = window.location.search.split('=')[1].split('&')[0]; console.log(productId); let itemtagscombinationRes = null; @@ -12,7 +16,7 @@ function startDetails(){ let currentClick = null; debugger; if(productId){ - getProductDetails(productId); + getProductDetails(productId); appendSpecs(productId) }else{ window.location.href = "/notfound.html" @@ -40,34 +44,71 @@ function startDetails(){ } function getSpecsItemHTML({name,des,itemid,id}){ + return `