Skip to content

Commit 2d377ce

Browse files
committed
update cart
1 parent d55cec1 commit 2d377ce

16 files changed

+23
-1
lines changed

checkout.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
<link rel="stylesheet" href="/style/naam.css">
1313
<link rel="stylesheet" href="/style/footer.css">
1414
<link rel="stylesheet" href="/style/select.css">
15+
<link rel="stylesheet" href="/container/navbar.css">
16+
<link rel="stylesheet" href="/style/p.css">
1517
</head>
18+
<script
19+
src="https://kit.fontawesome.com/24c494a6b6.js"
20+
crossorigin="anonymous"
21+
></script>
1622
<body>
1723
<div id="navbar"></div>
1824
<div id="main_box">

script/Kitchen_Staples.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ document.getElementById("show_products").append(div)
3939
let getFruit=({src,name,price})=>{
4040
arr.push({src,name,price})
4141
localStorage.setItem("all_items",JSON.stringify(arr))
42+
window.location.reload()
4243
}
4344

4445

script/baby.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ document.getElementById("show_products").append(div)
3939
let getFruit=({src,name,price})=>{
4040
arr.push({src,name,price})
4141
localStorage.setItem("all_items",JSON.stringify(arr))
42+
window.location.reload()
4243
}
4344

4445
document.getElementById("cart_no").innerText=arr.length

script/beverages.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ document.getElementById("show_products").append(div)
4040
let getFruit=({src,name,price})=>{
4141
arr.push({src,name,price})
4242
localStorage.setItem("all_items",JSON.stringify(arr))
43+
window.location.reload()
4344
}
4445

4546
document.getElementById("cart_no").innerText=arr.length

script/biscutes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ document.getElementById("show_products").append(div)
3939
let getFruit=({src,name,price})=>{
4040
arr.push({src,name,price})
4141
localStorage.setItem("all_items",JSON.stringify(arr))
42+
window.location.reload()
4243
}
4344

4445
document.getElementById("cart_no").innerText=arr.length

script/breakfast.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ document.getElementById("show_products").append(div)
3939
let getFruit=({src,name,price})=>{
4040
arr.push({src,name,price})
4141
localStorage.setItem("all_items",JSON.stringify(arr))
42+
window.location.reload()
4243
}
4344

4445
document.getElementById("cart_no").innerText=arr.length

script/checkout.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ document.getElementById("navbar").innerHTML=navbar()
33

44
let dat=JSON.parse(localStorage.getItem("all_items"))
55

6-
6+
let arr=JSON.parse(localStorage.getItem("all_items"))||[]
77

88
dat.map(({src,name},index)=>{
99
let d=document.createElement("div")
@@ -91,3 +91,5 @@ yy.addEventListener("click",gh)
9191

9292

9393

94+
95+
document.getElementById("cart_no").innerHTML=arr.length

script/cleaning.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ document.getElementById("show_products").append(div)
3838
let getFruit=({src,name,price})=>{
3939
arr.push({src,name,price})
4040
localStorage.setItem("all_items",JSON.stringify(arr))
41+
window.location.reload()
4142
}
4243

4344

script/dry_fruits.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ document.getElementById("show_products").append(div)
3939
let getFruit=({src,name,price})=>{
4040
arr.push({src,name,price})
4141
localStorage.setItem("all_items",JSON.stringify(arr))
42+
window.location.reload()
4243
}
4344

4445

script/fruit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ document.getElementById("show_products").append(div)
3535
let getFruit=({src,name,price})=>{
3636
arr.push({src,name,price})
3737
localStorage.setItem("all_items",JSON.stringify(arr))
38+
window.location.reload()
3839
}
3940

4041

0 commit comments

Comments
 (0)