-
Notifications
You must be signed in to change notification settings - Fork 2
/
verification.html
136 lines (135 loc) · 3.85 KB
/
verification.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shipping page</title>
<!-- stylesheet -->
<link rel="stylesheet" href="checkout.css" />
<!-- font awesome -->
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.15.4/css/all.css"
integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm"
crossorigin="anonymous"
/>
</head>
<style>
.before-payment {
width: 100%;
display: flex;
flex-direction: column;
gap: 30px;
}
.info {
width: 100%;
display: flex;
flex-direction: column;
gap: 10px;
border: 1px solid #31313150;
padding: 15px 10px;
box-sizing: border-box;
border-radius: 15px;
}
.contact-info,
.address-info {
display: flex;
align-items: center;
padding: 5px 0;
box-sizing: border-box;
}
.contact-info {
border-bottom: 1px solid #31313150;
padding-bottom: 10px;
}
.contact-info > div > a,
.address-info > div > a {
text-decoration: none;
color: #181811;
font-weight: 500;
}
.contact,
.address {
display: flex;
align-items: center;
width: 90%;
justify-content: flex-start;
gap: 20px;
}
.ship-method {
display: flex;
flex-direction: column;
gap: 20px;
}
.ship-method > h1 {
font-size: 30px;
font-weight: 400;
}
.contact > input,
.address > input {
width: 25px;
height: 25px;
}
</style>
<body>
<div class="container"></div>
</body>
</html>
<script type="module">
import { appenditems, checkoutpage } from "../components/script.js";
let cart = JSON.parse(localStorage.getItem("cartitems"));
let container = document.querySelector(".container");
container.innerHTML = checkoutpage("Continue to Payment");
let maindiv = document.querySelector(".showcart");
appenditems(cart, maindiv);
document.querySelector(".return").addEventListener("click", () => {
window.location.href = "cart.html";
});
let data = JSON.parse(localStorage.getItem("orderinfo"));
console.log(data);
let template = document.querySelector(".verifybox");
template.innerHTML = `<div class="before-payment">
<div class="info">
<div class="contact-info">
<div class="contact">
<p>Contact</p>
<p>${data.email}</p>
</div>
<div><a href="checkout.html">Change</a></div>
</div>
<div class="address-info">
<div class="address">
<p>Ship to</p>
<p>${data.address}</p>
</div>
<div><a href="checkout.html">Change</a></div>
</div>
</div>
<div class="ship-method">
<h1>Shipping method</h1>
<div class="info">
<div class="contact-info">
<div class="contact">
<input type="radio" name="payment" value="prepaid" id="" />
<p>Prepaid - Net banking, UPI, Debit/Credit Card</p>
</div>
<div><a href="#">Free</a></div>
</div>
<div class="address-info">
<div class="address">
<input type="radio" name="payment" value="cash" id="" />
<p>Cash on Delivery</p>
</div>
<div><a href="#">₹ 70.00</a></div>
</div>
</div>
</div>
</div>`;
document.querySelector(".return").addEventListener("click", () => {
window.location.href = "checkout.html";
});
document.querySelector(".btndiv > button").addEventListener("click", () => {
window.location.href = "payment.html";
});
</script>