-
Notifications
You must be signed in to change notification settings - Fork 0
/
product.php
167 lines (157 loc) · 7.71 KB
/
product.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
<?php
require('top.php');
if (isset($_GET['id'])) {
$product_id = mysqli_real_escape_string($con, $_GET['id']);
if ($product_id > 0) {
$get_product = get_product($con, '', '', $product_id);
} else {
?>
<script>
window.location.href = 'dashboard.php';
</script>
<?php
}
} else {
?>
<script>
window.location.href = 'dashboard.php';
</script>
<?php
}
?>
<!-- Start Bradcaump area -->
<div class="ht__bradcaump__area" style="background: rgba(0, 0, 0, 0) url(images/bg/4.jpg) no-repeat scroll center center / cover ;">
<div class="ht__bradcaump__wrap">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="bradcaump__inner">
<nav class="bradcaump-inner">
<a class="breadcrumb-item" href="dashboard.php">Home</a>
<span class="brd-separetor"><i class="zmdi zmdi-chevron-right"></i></span>
<a class="breadcrumb-item" href="categories.php?id=<?php echo $get_product['0']['category_id'] ?>"><?php echo $get_product['0']['category_name'] ?></a>
<span class="brd-separetor"><i class="zmdi zmdi-chevron-right"></i></span>
<span class="breadcrumb-item active"><?php echo $get_product['0']['product_name'] ?></span>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Bradcaump area -->
<!-- Start Product Details Area -->
<section class="htc__product__details bg__white ptb--100">
<!-- Start Product Details Top -->
<div class="htc__product__details__top">
<div class="container">
<div class="row">
<div class="col-md-5 col-lg-5 col-sm-12 col-xs-12">
<div class="htc__product__details__tab__content">
<!-- Start Product Big Images -->
<div class="product__big__images">
<div class="portfolio-full-image tab-content">
<div role="tabpanel" class="tab-pane fade in active" id="img-tab-1">
<img src="<?php echo PRODUCT_IMAGE_SITE_PATH . $get_product['0']['product_image'] ?>">
</div>
</div>
</div>
<!-- End Product Big Images -->
</div>
</div>
<div class="col-md-7 col-lg-7 col-sm-12 col-xs-12 smt-40 xmt-40">
<div class="ht__product__dtl">
<h2><?php echo $get_product['0']['product_name'] ?></h2>
<ul class="pro__prize">
<li class="old__prize"><strike><?php echo $get_product['0']['product_MRP'] ?></strike></li>
<li><?php echo $get_product['0']['product_price'] ?></li>
</ul>
<p class="pro__info"><?php echo $get_product['0']['product_details'] ?></p>
<div class="ht__pro__desc">
<div class="sin__desc">
<?php
$sql = "SELECT product_quantity from product where product_id='$product_id'";
$result = $con->query($sql);
// Associative array
$row = $result->fetch_assoc();
$product_quantity = $row["product_quantity"];
?>
<p><span>Availability: </span><?php echo $product_quantity ?></p>
</div>
<div class="sin__desc">
<p><span>Select Qty:</span>
<select id="qty">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
</select>
</p>
</div>
<div class="sin__desc align--left">
<p><span>Categories:</span></p>
<ul class="pro__cat__list">
<li><a href=""><?php echo $get_product['0']['category_name'] ?></a></li>
</ul>
</div>
</div>
</div>
<a class="fr__btn" href="javascript:void(0)" onclick="manage_cart('<?php echo $get_product['0']['product_id'] ?>','add')">Add to cart</a>
</div>
</div>
</div>
</div>
</div>
<!-- End Product Details Top -->
</section>
<!-- End Product Details Area
<!-- Start Product Description -->
<section class="htc__produc__decription bg__white">
<div class="container">
<div class="row">
<div class="col-xs-12">
<!-- Start List And Grid View -->
<ul class="pro__details__tab" role="tablist">
<li role="presentation" class="description active"><a href="#description" role="tab" data-toggle="tab">description</a></li>
</ul>
<!-- End List And Grid View -->
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="ht__pro__details__content">
<!-- Start Single Content -->
<div role="tabpanel" id="description" class="pro__single__content tab-pane fade in active">
<div class="pro__tab__content__inner">
<?php echo $get_product['0']['product_details'] ?>
</div>
</div>
<!-- End Single Content -->
</div>
</div>
</div>
</div>
</section>
<!-- End Product Description -->
<?php require('footer.php') ?>