-
Notifications
You must be signed in to change notification settings - Fork 4
/
details.php
361 lines (325 loc) · 10.7 KB
/
details.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
<?php
session_start();
include("include/dbcon.php");
include("include/function.php");
setGetCookie();
?>
<?php
if(isset($_GET['productId'])){
$productId = $_GET['productId'];
$sqlDet = "SELECT * FROM product WHERE productId = '$productId'";
$getDetail = mysqli_query($conn,$sqlDet);
$rowDetails = mysqli_fetch_array($getDetail);
$productId = $rowDetails['productId'];
$productName = $rowDetails['productName'];
$productPrice = $rowDetails['productPrice'];
$productImg1 = $rowDetails['image1'];
$productImg2 = $rowDetails['image2'];
$productImg3 = $rowDetails['image3'];
$productImg4 = $rowDetails['image4'];
$productPrice = $rowDetails['productPrice'];
$productDetails = $rowDetails['productDetails'];
$productManu = $rowDetails['manufactureId'];
$productCate = $rowDetails['categoryId'];
$productKeyword = $rowDetails['productKeywords'];
$productFeat = $rowDetails['features'];
$productAvailability = $rowDetails['availability'];
$productWarranty = $rowDetails['Warranty'];
$getManufacureSql = "SELECT * FROM manufacture WHERE manufactureId='$productManu'";
$getManufacureDetails = mysqli_query($conn,$getManufacureSql);
$rowGetManufacureDetails = mysqli_fetch_array($getManufacureDetails);
$getCategorySql ="SELECT * FROM category WHERE categoryId ='$productCate'";
$getCategoryDetails = mysqli_query($conn,$getCategorySql);
$rowGetCategoryDetails = mysqli_fetch_array($getCategoryDetails);
$manName = $rowGetManufacureDetails['manName'];
$cateName = $rowGetCategoryDetails['catName'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>AZONE - Kurunegala</title>
<!--Add CSS Files-->
<link rel="stylesheet" type="text/css" href="resources/css/styles.css">
<link rel="stylesheet" type="text/css" href="resources/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="resources/font-awesome/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,300,400,700,900" rel="stylesheet">
</head>
<body>
<!-- Start Top-->
<div class="top">
<!-- Start Container-->
<div class="container">
<div class="col-md-6 offer">
<a href="#" class="btn btn-primary btn-sm">
<?php
welcomeUser();
?>
</a>
<a href="#">
Cart Total Price : Rs<?php priceCart();?>, No of items : <?php countCart(); ?>
</a>
</div>
<div class="col-md-6">
<!-- Start Menu-->
<ul class="menu">
<?php
switchLoginLogout();
?>
</ul>
</div>
</div>
</div>
<!-- Navigation Bar Start-->
<div class="navbar navbar-default" id="navbar">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand home" href="index.php">
<img src="resources/img/logo.jpg" alt="logo" class="logo">
</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation">
<span class="sr-only">Toggle Navigation</span>
<i class="fa fa-align-justify"></i>
</button>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#search">
<span class="sr-only">Toggle Search</span>
<i class="fa fa-search"></i>
</button>
</div>
<div class="navbar-collapse collapse" id="navigation">
<div class="padding-nav">
<ul class="nav navbar-nav navbar-left">
<li>
<a href="index.php">Home</a>
</li>
<li class="active">
<a href="store.php">Store</a>
</li>
<li>
<a href="cart.php">Cart</a>
</li>
<li>
<a href="customers/myaccount.php?myorders">My Account</a>
</li>
<li>
<a href="contact.php">Contact Us</a>
</li>
</ul>
</div>
<a class="btn btn-info navbar-btn right" href="cart.php">
<i class="fa fa-shopping-cart"></i>
<span><?php countCart(); ?> items in cart</span>
</a>
<div class="navbar-collapse collapse right">
<button type="button" class="btn btn-info navbar-btn" data-toggle="collapse" data-target="#search">
<span class="sr-only">Toggle Search</span>
<i class="fa fa-search"></i>
</button>
</div>
<div class="collapse clearfix" id="search">
<form class="navbar-form" method="get" action="result.php">
<div class="input-group">
<input class="form-control" type="text" placeholder="Search" name="user_query" required>
<span class="input-group-btn">
<button type="submit" value="Search" name="search" class="btn btn-info">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
</div>
</div>
</div>
</div>
<div id="content">
<div class="container">
<div class="col-md-12">
<ul class="breadcrumb">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="store.php">Shop</a>
</li>
<li>
<a href="store.php?category=<?php echo $productCate;?>"><?php echo $cateName;?></a>
</li>
<li>
<a href="store.php?manufacture=<?php echo $productManu;?>"><?php echo $manName;?></a>
</li>
</ul>
</div>
<div class="col-md-3">
<?php
include("include/side.php");
?>
</div>
<div class="col-md-9">
<div class="row" id="productarea">
<div class="col-sm-6">
<div id="imgMain">
<div id="productSlideShow" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#productSlideShow" data-slide-to="0" class="active"></li>
<li data-target="#productSlideShow" data-slide-to="1"></li>
<li data-target="#productSlideShow" data-slide-to="2"></li>
<li data-target="#productSlideShow" data-slide-to="3"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<center>
<img src="admin/resources/img/product_img/<?php echo $productImg1;?>" alt="" class="img-responsive">
</center>
</div>
<div class="item">
<center>
<img src="admin/resources/img/product_img/<?php echo $productImg2;?>" alt="" class="img-responsive">
</center>
</div>
<div class="item">
<center>
<img src="admin/resources/img/product_img/<?php echo $productImg3;?>" alt="" class="img-responsive">
</center>
</div>
<div class="item">
<center>
<img src="admin/resources/img/product_img/<?php echo $productImg4;?>" alt="" class="img-responsive">
</center>
</div>
</div>
<a href="#productSlideShow" class="left carousel-control" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a href="#productSlideShow" class="right carousel-control" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="box">
<h2 class="text-center"><?php echo $productName;?></h2>
<?php
addCart();
?>
<hr>
<form action="" method="post" class="form-horizontal">
<div class="form-group">
<input type="hidden" name="productId" value="<?php echo $productId;?>">
</div>
<div class="form-group">
<label for="" class="col-md-5 control-label">
Quantity
</label>
<div class="col-md-7">
<select name="qty" id="" class="form-control">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div>
<div class="form-group">
<label for="" class="col-md-5 control-label">Color</label>
<div class="col-md-7">
<select name="color" id="" class="form-control">
<option> Black </option>
<option> Red </option>
<option> Gold </option>
<option> Blue </option>
<option> Silver </option>
</select>
</div>
</div>
<div class="form-group">
<label for="" class="col-md-5 control-label">Warrenty</label>
<div class="col-md-7">
<select name="warrenty" id="" class="form-control">
<option> Software </option>
<option> Hardware </option>
</select>
</div>
</div>
<p class="price">Rs <?php echo $productPrice;?></p>
<p class="text-center buttons">
<button class="btn btn-info" type="submit" name="addCart">
<i class="fa fa-shopping-cart"></i> Add to Cart
</button>
<?php
if(isset($_SESSION['cusEmail'])){
echo "
<button class='btn btn-success'' type='submit' name='addwishlist'>
<i class='fa fa-heart'></i> Add to Wishlist
</button>
";
}
?>
</p>
</form>
</div>
<div class="row" id="thumbs">
<!-- One Image Side-->
<div class="col-xs-3">
<a href="#" class="thumb">
<img src="admin/resources/img/product_img/<?php echo $productImg1?>" alt="" class="img-responsive">
</a>
</div>
<!-- One Image Side End-->
<!-- One Image Side-->
<div class="col-xs-3">
<a href="#" class="thumb">
<img src="admin/resources/img/product_img/<?php echo $productImg2?>" alt="" class="img-responsive">
</a>
</div>
<!-- One Image Side End-->
<!-- One Image Side-->
<div class="col-xs-3">
<a href="#" class="thumb">
<img src="admin/resources/img/product_img/<?php echo $productImg3?>" alt="" class="img-responsive">
</a>
</div>
<!-- One Image Side End-->
<!-- One Image Side-->
<div class="col-xs-3">
<a href="#" class="thumb">
<img src="admin/resources/img/product_img/<?php echo $productImg4?>" alt="" class="img-responsive">
</a>
</div>
<!-- One Image Side End-->
</div>
</div>
</div>
<div class="box" id="details">
<h4>Description</h4>
<p><?php echo $productDetails;?></p>
<hr>
</div>
<div id="row same-height-row">
<div class="col-md-3 col-sm-6">
<div class="box same-height headline">
<h3 class="text-center">Check this products out</h3>
</div>
</div>
<?php
suggestProducts();
?>
</div>
</div>
</div>
</div>
<!--Footer Start-->
<?php
include("include/foot.php");
?>
<!--Add JavaScript Files-->
<script src="resources/js/jquery.min.js"></script>
<script src="resources/js/bootstrap.min.js"></script>
</body>
</html>
<?php
addWishList();
?>