-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcart.html
201 lines (182 loc) · 7.73 KB
/
cart.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cart</title>
<link rel="stylesheet" href="/style/style.css">
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
</head>
<body>
<section class="header">
<a href="#" > <img src="/imag/ logo.jpg" alt=""></a>
<details><summary>All</summary>
<div>
<!-- Content of the dropdown -->
<p>pants</p>
<p>lower</p>
<p>shirts</p>
<p>T-SHIRTS</p>
<p>top</p>
<!-- Add more content if needed -->
</div>
</details>
<input type="text" id="searchInput" placeholder="Enter your search query">
<!-- Add a search icon -->
<span id="searchIcon" class="search-icon" onclick="performSearch()">🔍</span>
<ul class="navibar" id="navbar">
<li><a href="/index.html" ><span>home</span><i class="fa fa-home"></i></a></li>
<li><a href="/shop.html"><span>shop</span><i class="fa fa-shopping-cart"></i></a></li>
<li><a href="/about.html"><span>about</span><i class="fa fa-info-circle"></i></a></li>
<li><a href="/contact.html"><span>contact</span><i class="fa fa-envelope"></i></a></li>
<li><a href="/sign.html"><span>sign</span><i class="fa fa-user"></i></a></li>
<li id="lg-bag"><a href="/cart.html" class="active"><i class="fa fa-shopping-basket"></i></a></li>
<a href="#" id="close"><i class="fa fa-times"></i></a>
</ul>
<div id="mobile">
<a href="cart.html"><i class="fa fa-shopping-basket"></i></a>
<i id="bar" class="fa fa-outdent"></i>
</div>
</section>
<section id="page-header" class="cart-header">
<p> add to cart
</p>
<h2>#hello welcome</h2>
</section>
<section id="cart" class="section">
<table width="100%">
<thead>
<tr>
<td>Remove</td>
<td>Image</td>
<td>Product</td>
<td>Price</td>
<td>Quantity</td>
<td>Subtotal</td>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#"><i class="fa fa-times-circle"></i></a></td>
<td> <img src="https://rukminim2.flixcart.com/image/832/832/xif0q/t-shirt/b/r/g/s-cmb-po2-dab-wynk-smartees-original-imagm5vhumtz8epz.jpeg?q=70" alt=""></td>
<td>addidas</td>
<td>$70</td>
<td><input type="number" value="1"></td>
<td>$70</td>
</tr>
<tr>
<td><a href="#"><i class="fa fa-times-circle"></i></a></td>
<td> <img src="https://rukminim2.flixcart.com/image/832/832/xif0q/shopsy-t-shirt/c/f/2/m-st-brooklynhalfsleeve-black-smartees-original-imagph2fqzfy3yvk.jpeg?q=70" alt=""></td>
<td>addidas</td>
<td>$70</td>
<td><input type="number" value="1"></td>
<td>$70</td>
</tr>
<tr>
<td><a href="#"><i class="fa fa-times-circle"></i></a></td>
<td> <img src="https://rukminim2.flixcart.com/image/832/832/xif0q/t-shirt/b/q/m/m-st-santa-black-smartees-original-imagqaxfbfgzthte.jpeg?q=70" alt=""></td>
<td>addidas</td>
<td>$70</td>
<td><input type="number" value="1"></td>
<td>$70</td>
</tr>
</tbody>
</table>
</section>
<section id="cart-add" class="section">
<div id="coupon">
<h3>Apply coupon</h3>
<div><input type="text" placeholder="enter your coupon" id="job-input">
<button class="normal" id="apply-button">Apply</button></div>
</div>
<div id="Subtotal">
<h3>Cart total</h3>
<table>
<tr>
<td>cart Subtotal</td>
<td>$50</td>
</tr>
<tr>
<td>shipping</td>
<td>free</td>
</tr>
<tr>
<td><strong>total</strong></td>
<td>$50</td>
</tr>
</table>
<button class="normal">Proceed to check out</button>
</div>
</section>
<footer >
<div class="col">
<img src="/imag/ logo.jpg" alt="">
<h4>about us</h4>
<p><strong>Address:</strong>jawahar bhavan IIT ROORKEE</p>
<p><strong>Phone:</strong>**********</p>
<div class="follow">
<h4>follow us</h4>
<div class="icon">
<a href="#" class="fa fa-facebook"> </a>
<a href="#" class="fa fa-twitter"> </a>
<a href="#" class="fa fa-linkedin"> </a>
<a href="#" class="fa fa-instagram"> </a>
</div>
</div>
</div>
<div class="col">
<h4>About</h4>
<a href="#">About us</a>
<a href="#">Privacy policy</a>
<a href="#">Terms and conditions</a>
<a href="#">contact us</a>
</div>
<div class="col">
<h4>My account</h4>
<a href="#">Sign In </a>
<a href="#">Veiw cart</a>
<a href="#">Track my order</a>
<a href="#">Help</a>
</div>
<div class="col install">
<h4>Install App</h4>
<p>from app store or Google play</p>
<div class="row">
<a href="https://apps.apple.com/app/your-ios-app-id" target="_blank">
<img src="https://w7.pngwing.com/pngs/270/658/png-transparent-app-store-apple-google-play-apple-text-logo-mobile-phones-thumbnail.png" alt="Download on the App Store (iOS)">
</a>
<!-- Link to Google Play Store -->
<a href="https://play.google.com/store/apps/details?id=your.android.app.package" target="_blank">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTexJ5lzjJWp0rlRO80IWZph86kxb8bU7-mkvwJx-MLnw&s" alt="Get it on Google Play (Android)">
</a>
</div>
</div>
</footer>
<script src="/js/source.js" >
document.addEventListener('DOMContentLoaded', function() {
const applyButton = document.getElementById('apply-button');
const jobInput = document.getElementById('job-input');
if (applyButton) {
applyButton.addEventListener('click', function() {
const jobCode = jobInput.value.trim(); // Remove leading/trailing spaces
if (jobCode) {
// Application successful
const resultMessage = 'Application successful! You applied coupon code: ' + jobCode;
// Encode the message for URL
const encodedMessage = encodeURIComponent(resultMessage);
// Redirect to another page with the result message in the URL
window.location.href = 'result.html?message=' + encodedMessage;
} else {
// Empty input, show error
const errorMessage = 'Error: Please enter a coupon';
// Encode the message for URL
const encodedMessage = encodeURIComponent(errorMessage);
// Redirect to another page with the error message in the URL
window.location.href = 'result.html?message=' + encodedMessage;
}
});
}
});
</script>
</body>
</html>