-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct.php
146 lines (133 loc) · 7.03 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
<?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='index.php';
</script>
<?php
}
}else{
?>
<script>
window.location.href='index.php';
</script>
<?php
}
?>
<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="index.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']['categories_id']?>"><?php echo $get_product['0']['categories']?></a>
<span class="brd-separetor"><i class="zmdi zmdi-chevron-right"></i></span>
<span class="breadcrumb-item active"><?php echo $get_product['0']['name']?></span>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
<section class="htc__product__details bg__white ptb--100">
<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">
<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']['image']?>">
</div>
</div>
</div>
</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']['name']?></h2>
<ul class="pro__prize">
<li class="old__prize">₹<?php echo $get_product['0']['mrp']?></li>
<li>₹<?php echo $get_product['0']['price']?></li>
</ul>
<p class="pro__info"><?php echo $get_product['0']['short_desc']?></p>
<div class="ht__pro__desc">
<div class="sin__desc">
<?php
$productSoldQtyByProductId=productSoldQtyByProductId($con,$get_product['0']['id']);
$pending_qty=$get_product['0']['qty']-$productSoldQtyByProductId;
$cart_show='yes';
if($get_product['0']['qty']>$productSoldQtyByProductId){
$stock='In Stock';
}else{
$stock='Out of Stock';
$cart_show='';
}
?>
<p><span>Availability:</span><?php echo $stock ?> </p>
</div>
<div class="sin__desc">
<?php if($cart_show!=''){ ?>
<p><span>Qty:</span>
<select id="qty">
<?php
for($i=1;$i<=$pending_qty;$i++){
echo "<option>$i</option>";
}
?>
</select>
</p>
<?php } ?>
</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']['categories']?></a></li>
</ul>
</div>
</div>
</div>
<?php
if($cart_show!=''){
?>
<a class="fr__btn" href="javascript:void(0)" onclick="manage_cart('<?php echo $get_product['0']['id']?>','add')">Add to cart</a>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="htc__produc__decription bg__white">
<div class="container">
<div class="row">
<div class="col-xs-12">
<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>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="ht__pro__details__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']['description']?>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php require('footer.php')?>