generated from TheMaxium69/TyroSiteFrameWork
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestProducts.php
179 lines (144 loc) · 7.46 KB
/
testProducts.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
<?php include "app/app.php";
$page = 2;
head($page); ?>
<body>
<header> <?php navbar($page); ?> </header>
<?php
require_once 'panel/init.php';
require_once 'api/whmcs/connect.php';
require_once 'api/more/get.php';
$productAll = product();
$productGroupAll = productGroup();
$productMax = 40;
$productMin = 40;
foreach ($productAll['product'] as $product) {
if ($productMax < $product['pricing']['EUR']['monthly']) {
$productMax = $product['pricing']['EUR']['monthly'];
}
}
?>
<?php if (!empty($_GET['p'])) {
$id = $_GET['p'];
productOne($id);
} else { ?>
<main>
<h1 class="text-center mt-5" id="title">Trouvez votre paire préférée</h1>
<!-- FILTRE SEARCH -->
<div class="container w-100" id="search">
<div class="cover">
<form class="flex-form">
<label for="from">
<i class="ion-location"></i>
</label>
<input class="w-100 pe-4" id="searchInput" type="search" placeholder="Recherchez un produit ...">
</form>
</div>
</div>
<!-- FILTRE SEARCH -->
<div class="row">
<div class="col-3" id="filter">
<h3 class="text-center mb-5">Filtrer par : </h3>
<!-- FILTRE PRICE -->
<p class="mt-4 text-center">Prix : </p>
<div class="wrapper" id="filterPrice">
<fieldset class="filter-price">
<div class="price-field">
<input oninput="showValMin(this.value)" onchange="showValMin(this.value)" type="range" min="<?= $productMin ?>" max="<?= $productMax ?>" value="<?= $productMin ?>" id="lower">
<input oninput="showValMax(this.value)" onchange="showValMax(this.value)" type="range" min="<?= $productMin ?>" max="<?= $productMax ?>" value="<?= $productMax ?>" id="upper">
</div>
<div class="price-wrap">
<div class="price-container">
<div class="price-wrap-1">
<input id="one">
<label for="one">€</label>
</div>
<div class="price-wrap_line">-</div>
<div class="price-wrap-2">
<input id="two">
<label for="two">€</label>
</div>
</div>
</div>
</fieldset>
</div>
<!-- / FILTRE PRICE -->
<div class="w-100">
<select class="form-select w-75 mx-auto" aria-label="Default select example">
<option selected>Taille</option>
<option value="1">37</option>
<option value="2">38</option>
<option value="3">39</option>
<option value="4">40</option>
<option value="5">41</option>
<option value="6">42</option>
<option value="7">43</option>
<option value="8">44</option>
<option value="9">45</option>
</select>
</div>
<!-- FILTRE MARQUE -->
<div class="dropdown" data-control="checkbox-dropdown">
<label class="dropdown-label">Choix des marques</label>
<div class="dropdown-list">
<a href="#" data-toggle="check-all" class="dropdown-option">
Check All
</a>
<label class="dropdown-option">
<input type="checkbox" name="dropdown-group" value="adidas" />
Adidas
</label>
<label class="dropdown-option">
<input type="checkbox" name="dropdown-group" value="nike" />
Nike
</label>
<label class="dropdown-option">
<input type="checkbox" name="dropdown-group" value="jordan" />
Jordan
</label>
<label class="dropdown-option">
<input type="checkbox" name="dropdown-group" value="yeezy" />
Yeezy
</label>
</div>
</div>
</div>
<!-- CARD -->
<div class="container col-9" id="cardProductAll">
<div class="row justify-content-center" id="tableTEST">
<?php foreach ($productAll['product'] as $product) {
$productPicture = getPicture($product['pid']);
if ($product['pricing']['EUR']['monthly'] < 40) {
} else {
?>
<div class="card card__one" onclick="window.location.href = '?p=<?= $product['pid'] ?>';">
<div class="product-image">
<!-- <img src="app/assets/sneakersLV.png" alt="OFF-white Red Edition" draggable="false" /> -->
<img class="card-img-top" src="api/more/uploads/<?= $productPicture['picture1'] ?>" alt="Card image cap">
<!-- <img class="card-img-top" src="https://cdn.shopify.com/s/files/1/2358/2817/products/vaporwaffle-sacai-black-white-131891.png?v=1638814653" alt=""> -->
</div>
<div class="product-info">
<h2 class="nameSneakers"><?= $product['name'] ?></h2>
<?php foreach ($productGroupAll as $productGroup) {
if ($product['gid'] == $productGroup['id']) {
?>
<h6 name="marqueProduct" class="nameMarque marque<?= $productGroup['id'] ?>"><?= $productGroup['name'] ?></h6>
<?php
}
} ?>
<div class="price"><?= $product['pricing']['EUR']['monthly'] ?> €</div>
</div>
</div>
<?php
}
} ?>
</div>
</div>
</section>
<!-- / CARD -->
</div>
</main>
<script src="javascript/filtre.js"></script>
<?php } ?>
<footer> <?php footer($page); ?> </footer>
</body>
</html>