-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjapi.html
174 lines (135 loc) · 6.75 KB
/
japi.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Japi</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="bg-dark text-white text-center py-3">
<h1>Japi</h1>
<nav class="navbar navbar-expand-lg navbar-dark">
<ul class="navbar-nav ml-auto">
<li class="nav-item"><a class="nav-link" href="#about">About Us</a></li>
<li class="nav-item"><a class="nav-link" href="#products">Products</a></li>
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<section id="about" class="py-5">
<div class="container">
<h2 class="text-center">About Us</h2>
<p class="lead text-center">Explore the Most Decorative Ranges</p>
</div>
</section>
<section id="products" class="py-5">
<div class="container">
<h2 class="text-center mb-4">Our Products</h2>
<div class="row">
<div class="col-lg-6 mb-4">
<div class="card">
<img src="https://5.imimg.com/data5/SELLER/Default/2023/8/331923087/OD/HC/AX/189557536/1691068696269-500x500.jpg" class="card-img-top" alt="Tea 1">
<div class="card-body text-center">
<h3 class="card-title">Trays and Covers</h3>
<p class="card-text">Useful to serve drinks and foods </p>
<p class="card-text"><strong>Price (per set of trays and covers): RS. 899.00</strong></p>
<button class="btn btn-warning" ><a href="#container">Book Now</a></button>
</div>
</div>
</div>
<div class="col-lg-6 mb-4">
<div class="card">
<img src="https://assets.bldnxt.in/catalog/product/cache/1/image/a77c1558d860704591e3027d1ebed402/_/r/_ragh700186_5f15810a7b719.png" class="card-img-top" alt="Tea 2">
<div class="card-body text-center">
<h3 class="card-title">Wicker Basket</h3>
<p class="card-text">Garden party shower basket</p>
<p class="card-text"><strong>Price (per Wicker Basket): 899.00</strong></p>
<button class="btn btn-warning"><a class="nav-link" href="#container">Book Now</a></button>
</div>
</div>
</div>
<!-- Add more products as needed -->
</div>
</div>
</section>
<section id="contact" class="py-5">
<div class="container">
<h2 class="text-center">Contact Us</h2>
<p class="lead text-center">Have questions or want to place an order? Reach out to us!</p>
</div>
</section>
<section id="order" class="py-5 bg-light">
<div class="container" id="container">
<h2 class="text-center mb-4">Order Summary</h2>
<form>
<div class="form-group">
<label for="product">Select Product:</label>
<select class="form-control" id="product" name="product">
<option value="Trays and Covers">Trays and Covers</option>
<option value="Wicker Basket">Wicker Basket</option>
<!-- Add more options as needed -->
</select>
</div>
<div class="form-group">
<label for="quantity">Quantity:
<input type="number" class="form-control" id="quantity" name="quantity" placeholder="Enter Quantity"
min="1" required>
</label>
<div class="form-group">
<label for="coupon">Coupon Code:
<input type="text" class="form-control" id="coupon" name="coupon" value="coupon">
</label>
</div>
<button id="tea" onclick="calculateTotal(event,coupon)">Calculate</button>
<p id="result"></p>
</div>
<!-- <button id="tea1" onclick="calculateFinal(event,a)">Calculate1</button>
<p id="result1"></p> -->
<button type="submit" class="btn btn-warning"><a href="qr.jpg">Proceed to Checkou</a>t</button>
</form>
</div>
</section>
<footer class="bg-dark text-white text-center py-3">
<p>© 2023 Tea Seller. All rights reserved.</p>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script>
function bookNow(product, price) {
const quantity = 1; // Default quantity is 1 kg
const coupon = document.getElementById('coupon').value;
console.log(coupon);
const total = price * quantity;
// Display a confirmation message
alert(`You have booked ${quantity} kg of ${product} for $${total}. Coupon: ${coupon || 'None'}`);
}
function calculateTotal(event,coupon) {
event.preventDefault();
let pricePerItem = 899; // Example Price
let quantity = document.getElementById("quantity").value;
let result = document.getElementById("result");
let totalPrice = pricePerItem * quantity;
val = "sJ7@Vu0w";
// if(!coupon)
// console.log("hi");
if (coupon.value === val) {
totalPrice =( (totalPrice * 90) / 100);
}
else {
totalPrice=totalPrice;
}
// document.getElementById("tea").addEventListener("submit",function(event) {
// event.preventDefault();
// })
result.innerText = "Total Price: Rs." + totalPrice;
// document.getElementById("tea").addEventListener("submit",function(event) {
// event.preventDefault();
// })
// preventDefault();
}
</script>
</body>
</html>