-
Notifications
You must be signed in to change notification settings - Fork 0
/
singleproduct.php
400 lines (334 loc) · 14.3 KB
/
singleproduct.php
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<?php
session_start();
if(!isset($_GET['pid'])){
header("Location:./");
}
include_once 'admin/database.php';
$itemid = $_GET['pid'];
define("pro",$itemid);
?><!doctype html>
<html lang="zxx">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Winter</title>
<link rel="icon" href="img/favicon.png">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- animate CSS -->
<link rel="stylesheet" href="css/animate.css">
<!-- owl carousel CSS -->
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/lightslider.min.css">
<!-- font awesome CSS -->
<link rel="stylesheet" href="css/all.css">
<!-- flaticon CSS -->
<link rel="stylesheet" href="css/flaticon.css">
<link rel="stylesheet" href="css/themify-icons.css">
<!-- font awesome CSS -->
<link rel="stylesheet" href="css/magnific-popup.css">
<!-- style CSS -->
<link rel="stylesheet" href="css/style.css">
<!-- jquery plugins here-->
<script src="js/jquery-1.12.1.min.js"></script>
<!-- popper js -->
<script src="js/popper.min.js"></script>
<!-- bootstrap js -->
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript"> function loadmodal(){ $("#myModal").modal("show");}</script>
<script type="text/javascript"> function loadmodal2(){ $("#myModal2").modal("show");}</script>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><b>Warning</b></h4>
</div>
<div class="modal-body">
<p>Product already in the cart</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal2" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><b><li class="fa fa-check" ></li> Success</b></h4>
</div>
<div class="modal-body">
<p>Product added to cart</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</head>
<body class="bg-white">
<!--::header part start::-->
<?php include_once 'include/header.php';
// include_once 'sessioncart.php';?>
<!-- Header part end-->
<!-- breadcrumb start-->
<section class="breadcrumb breadcrumb_bg">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-12">
<div class="breadcrumb_iner">
<div class="breadcrumb_iner_item">
<p>Home/Shop/ product</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- breadcrumb start-->
<!--================Single Product Area =================-->
<div class="product_image_area section_padding">
<div class="container">
<div class="row s_product_inner">
<div class="col-lg-5">
<div class="product_slider_img">
<div id="vertical">
<?php
$sql = "SELECT `path` FROM image WHERE Product_idProduct = $itemid ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<div data-thumb="admin/img/product/'.$row["path"].'">
<img src="admin/img/product/'.$row["path"].'" />
</div>';
}
}
?>
</div>
</div>
</div>
<div class="col-lg-5 offset-lg-1">
<div class="s_product_text">
<?php
$sql = "SELECT * FROM product , brand WHERE idProduct = $itemid and brand.idBrand = product.Brand_idBrand ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<h3>'.$row["title"].'</h3><hr>
<h2>LKR '.$row["price"].'</h2>
<ul class="list">
<li>
<a class="active" href="category.php?cat='.$row["category"].'">
<span>Category</span> : '.$row["category"].'</a>
</li>
<li>
<a class="" href="#">
<span>Color</span> : '.$row["color"].'</a>
</li>
<li>
<a class="" href="#">
<span>Brand</span> : '.$row["brandname"].'</a>
</li>
<li>
<a href="#"> <span>Availibility</span> : In Stock</a>
</li>
</ul>
<p>
'.$row["description"].'
</p>';
}
}
?>
<form method="POST" action="./cart.php" >
<?php echo '<input style="display:none" type="text" name="pid" value="'.pro.'">'; ?>
<div class="row" style="display: flex;">
<div class="col-lg-2">
<input name="size" value="sm" type="radio" id="sm-size">
<label for="sm-size">S</label>
</div>
<div class="col-lg-2">
<input name="size" value="md" type="radio" id="md-size">
<label for="md-size">M</label>
</div>
<div class="col-lg-2">
<input name="size" value="lg" type="radio" id="lg-size">
<label for="lg-size">L</label>
</div>
<div class="col-lg-2">
<input name="size" value="xl" type="radio" id="xl-size">
<label for="xl-size">XS</label>
</div>
</div>
<?php
if (isset($_GET['msg'])&&$_GET['msg']=='s') {
echo "<h6 style='color:#428bca'>Please select the size</h6><br>";
# code...
}
?><hr>
<div class="product_count d-inline-block">
<span class="inumber-decrement"> <i class="ti-minus"></i></span>
<input name="qty" class="input-number" type="text" value="1" min="0" max="10" style="border:none;text-align: center;">
<span class="number-increment"> <i class="ti-plus"></i></span>
</div><hr>
<div class="add_to_cart">
<button name="submit" type="submit" class="btn_3" value=<?php echo "'".$_GET['pid']."'"; ?> >Add to Cart </button>
</div>
</div></form>
</div>
</div>
</div>
</div>
</div>
<!--================End Single Product Area =================-->
<!--================Product Description Area =================-->
<!--================End Product Description Area =================-->
<!-- product_list part start-->
<section class="product_list best_seller padding_bottom">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-12">
<div class="section_tittle text-center">
<h2>Best Sellers</h2>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 col-sm-6">
<div class="single_category_product">
<div class="single_category_img">
<img src="img/category/category_2.png" alt="">
<div class="category_social_icon">
<ul>
<li><a href="#"><i class="ti-heart"></i></a></li>
<li><a href="#"><i class="ti-bag"></i></a></li>
</ul>
</div>
<div class="category_product_text">
<a href="single-product.html"><h5>Long Sleeve TShirt</h5></a>
<p>$150.00</p>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single_category_product">
<div class="single_category_img">
<img src="img/category/category_3.png" alt="">
<div class="category_social_icon">
<ul>
<li><a href="#"><i class="ti-heart"></i></a></li>
<li><a href="#"><i class="ti-bag"></i></a></li>
</ul>
</div>
<div class="category_product_text">
<a href="single-product.html"><h5>Long Sleeve TShirt</h5></a>
<p>$150.00</p>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single_category_product">
<div class="single_category_img">
<img src="img/category/category_4.png" alt="">
<div class="category_social_icon">
<ul>
<li><a href="#"><i class="ti-heart"></i></a></li>
<li><a href="#"><i class="ti-bag"></i></a></li>
</ul>
</div>
<div class="category_product_text">
<a href="single-product.html"><h5>Long Sleeve TShirt</h5></a>
<p>$150.00</p>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single_category_product">
<div class="single_category_img">
<img src="img/category/category_5.png" alt="">
<div class="category_social_icon">
<ul>
<li><a href="#"><i class="ti-heart"></i></a></li>
<li><a href="#"><i class="ti-bag"></i></a></li>
</ul>
</div>
<div class="category_product_text">
<a href="single-product.html"><h5>Long Sleeve TShirt</h5></a>
<p>$150.00</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- product_list part end-->
<!-- shipping details part end-->
<!-- shipping details part end-->
<!-- subscribe_area part start-->
<section class="instagram_photo">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="instagram_photo_iner">
<div class="single_instgram_photo">
<img src="img/instagram/inst_1.png" alt="">
<a href="#"><i class="ti-instagram"></i></a>
</div>
<div class="single_instgram_photo">
<img src="img/instagram/inst_2.png" alt="">
<a href="#"><i class="ti-instagram"></i></a>
</div>
<div class="single_instgram_photo">
<img src="img/instagram/inst_3.png" alt="">
<a href="#"><i class="ti-instagram"></i></a>
</div>
<div class="single_instgram_photo">
<img src="img/instagram/inst_4.png" alt="">
<a href="#"><i class="ti-instagram"></i></a>
</div>
<div class="single_instgram_photo">
<img src="img/instagram/inst_5.png" alt="">
<a href="#"><i class="ti-instagram"></i></a>
</div>
</div>
</div>
</div>
</div>
</section>
<!--::subscribe_area part end::-->
<!--::footer_part start::-->
<?php include_once 'include/footer.php'; ?>
<!--::footer_part end::-->
<!-- easing js -->
<script src="js/jquery.magnific-popup.js"></script>
<!-- swiper js -->
<script src="js/lightslider.min.js"></script>
<!-- swiper js -->
<script src="js/mixitup.min.js"></script>
<script src="js/lightslider.min.js"></script>
<!-- particles js -->
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.nice-select.min.js"></script>
<!-- slick js -->
<script src="js/slick.min.js"></script>
<script src="js/jquery.counterup.min.js"></script>
<script src="js/waypoints.min.js"></script>
<script src="js/contact.js"></script>
<script src="js/jquery.ajaxchimp.min.js"></script>
<script src="js/jquery.form.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/mail-script.js"></script>
<!-- custom js -->
<script src="js/custom.js"></script>
<?php function mod(){echo "<script type='text/javascript'> loadmodal(); </script>";}?>
<?php function mod2(){echo "<script type='text/javascript'> loadmodal2(); </script>";}?>
</body>
</html>