-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproduct.php
More file actions
147 lines (123 loc) · 5.03 KB
/
product.php
File metadata and controls
147 lines (123 loc) · 5.03 KB
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
<?php
$active = "Product";
include("db.php");
include("functions.php");
include('header.php');
?>
<div style="overflow: hidden;">
<!-- Breadcrumb Section Begin -->
<div class="breacrumb-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="breadcrumb-text product-more">
<a href="index.php"><i class="fa fa-home"></i> Home</a>
<a href="shop.php">Shop</a>
<span>Details</span>
</div>
</div>
</div>
</div>
</div>
<!-- Breadcrumb Section Begin -->
<!-- Product Shop Section Begin -->
<section class="product-shop spad page-details">
<div class="container">
<div class="row">
<div class="col-lg-3">
<div class="filter-widget">
<h4 class="fw-title">Categories</h4>
<ul class="filter-catagories">
<?php
getCat();
?>
</ul>
</div>
</div>
<div class="col-lg-9">
<div class="row">
<?php
getProd();
addCart();
?>
<form action='product.php?add_cart=<?php if (isset($_GET['products_id'])) {
$product_id = $_GET['products_id'];
echo $product_id;
} ?>' method='post'>
<div class="form-group">
<!-- form-group Begin -->
<div class='quantity'>
<div class='pro-qty'>
<input type='text' value='1' name="product_qty">
</div>
</div>
</div><!-- form-group Finish -->
<div class="form-group">
<!-- form-group Begin -->
<div class='pd-size-choose'>
<div class='sc-item'>
<input type='radio' id='sm-size' class="form-control" name='size' value="Small" required novalidate>
<label for='sm-size'>s</label>
</div>
<div class='sc-item'>
<input type='radio' id='md-size' class="form-control" name='size' value="Medium">
<label for='md-size'>m</label>
</div>
<div class='sc-item'>
<input type='radio' id='lg-size' class="form-control" name='size' value="Large">
<label for='lg-size'>l</label>
</div>
<div class='sc-item'>
<input type='radio' id='xl-size' class="form-control" name='size' value="XL">
<label for='xl-size'>xl</label>
</div>
</div>
<p id="msg"></p>
</div><!-- form-group Finish -->
<?php if ($_SESSION['customer_email'] == 'unset') {
echo "<a href='login.php' class='btn primary-btn pd-cart' style='margin-top: 20px;'> Add to cart</a>";
} else {
echo "<button class='btn primary-btn pd-cart' id='cartbtn' style='margin-top: 20px;'> Add to cart</button>";
}
?>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="related-products spad">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="section-title">
<h2>More like this</h2>
</div>
</div>
</div>
<div class="row">
<?php
relatedProducts();
?>
</div>
</div>
</div>
</div>
<?php
include('footer.php');
?>
<script>
$("#cartbtn").on('click', function() {
var atLeastOneChecked = false;
if (!$("input[name='size']").is(':checked')) {
$("#msg").html(
"<span class='alert alert-danger'>" +
"Please Choose Size </span>");
} else {
return;
}
});
</script>
</body>
</html>