-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct-add.php
237 lines (212 loc) · 15.4 KB
/
product-add.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
<!DOCTYPE html>
<html class="no-js" lang="en" data-theme="light">
<head>
<?php require './head.php' ?>
</head>
<body onload="viewCategory();fetchPriceCategory();changePricingView('singlePrice')">
<?php require './svg.php'; require './nav.php'; ?>
<main class="page-content">
<div class="container">
<div class="page-header">
<h1 class="page-header__title">Add Product</h1>
</div>
<div class="card add-product card--content-center">
<div class="card__wrapper">
<div class="card__container">
<form class="add-product__form">
<div class="add-product__row">
<div class="add-product__slider" id="addProductSlider">
<div class="add-product__thumbs">
<div class="add-product__thumbs-slider swiper-container">
</div>
</div>
<div class="add-product__gallery">
<div class="add-product__gallery-slider swiper-container">
<div class="swiper-wrapper">
<div id="showProducetImage"
class="add-product__gallery-slide swiper-slide">
<!-- <img id="showImage" /> -->
<div id="previewContainer">
</div>
<div id="loaderContainer">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="add-product__right">
<div class="row row--md">
<div class="col-12 form-group form-group--lg">
<label class="form-label">Product Image</label>
<div class="input-group">
<input class="input" id="productImage" type="file" accept="image/*"
onchange="preview(event,'Add')" multiple required>
</div>
</div>
<div class="col-12 form-group form-group--lg">
<label class="form-label">Product Name</label>
<div class="input-group">
<input class="input" id="productName" type="text" placeholder=""
required>
</div>
</div>
<div class="col-12 form-group form-group--lg">
<label class="form-label">Description</label>
<div class="input-editor" id="descriptionArea">
<div id="productDescription" class="js-description-editor"></div>
</div>
</div>
<div class="col-12 form-group form-group--lg">
<label class="form-label">Main Category</label>
<div class="input-group input-group--append">
<select id="mainCategory"
class="input js-input-select input--fluid" data-placeholder="">
<option value="knifeHandles">knifeHandles</option>
<option value="moreProducts">moreProducts</option>
</select><span class="input-group__arrow">
<svg class="icon-icon-keyboard-down">
<use xlink:href="#icon-keyboard-down"></use>
</svg></span>
</div>
</div>
<div class="col-12 form-group form-group--lg">
<label class="form-label">Category</label>
<div class="input-group input-group--append">
<select onchange="according(event)" id="productCategory"
class="input js-input-select input--fluid" data-placeholder="">
</select><span class="input-group__arrow">
<svg class="icon-icon-keyboard-down">
<use xlink:href="#icon-keyboard-down"></use>
</svg></span>
</div>
</div>
<div class="col-12 form-group form-group--lg">
<label class="form-label">Sub-Category</label>
<div class="input-group input-group--append">
<select id="productSubCategory"
class="input js-input-select input--fluid" data-placeholder="">
</select><span class="input-group__arrow">
<svg class="icon-icon-keyboard-down">
<use xlink:href="#icon-keyboard-down"></use>
</svg></span>
</div>
</div>
<div class="col-12 form-group form-group--lg">
<input type="radio" name="toggle" id="radio1" checked="checked"
onclick="changePricingView('singlePrice')" /> Single Price
<input type="radio" name="toggle" id="radio2"
onclick="changePricingView('multiplePrice')" /> Multiple Price
</div>
<div class="col-12 col-md-6 form-group form-group--lg priceContent"
data-option="singlePrice">
<label class="form-label">Old Price</label>
<div class="input-group input-group--prepend">
<div class="input-group__prepend"><span
class="input-group__symbol"></span>
</div>
<input class="input" id="productOldPrice" type="number" min="0"
max="999999999" placeholder="" required>
</div>
</div>
<div class="col-12 col-md-6 form-group form-group--lg priceContent"
data-option="singlePrice">
<label class="form-label">Price</label>
<div class="input-group input-group--prepend">
<div class="input-group__prepend"><span
class="input-group__symbol"></span>
</div>
<input class="input" id="productPrice" type="number" min="0"
max="999999999" placeholder="" required>
</div>
</div>
<div class="col-12 form-group form-group--lg priceContent"
data-option="multiplePrice">
<label class="form-label">Price-Category</label>
<div class="input-group input-group--append">
<select id="priceCategory" onchange="clearMultiplePrice()" class="input js-input-select input--fluid"
data-placeholder="">
</select><span class="input-group__arrow">
<svg class="icon-icon-keyboard-down">
<use xlink:href="#icon-keyboard-down"></use>
</svg></span>
</div>
</div>
<div id="priceList" class="col-12 form-group form-group--lg priceContent"
data-option="multiplePrice">
</div>
<div class="col-5 form-group form-group--lg priceContent"
data-option="multiplePrice">
<div class="input-group input-group--prepend">
<div class="input-group__prepend"><span
class="input-group__symbol"></span>
</div>
<input class="input" id="priceType" type="text"
placeholder="Type" required>
</div>
</div>
<div class="col-5 form-group form-group--lg priceContent"
data-option="multiplePrice">
<div class="input-group input-group--prepend">
<div class="input-group__prepend"><span
class="input-group__symbol"></span>
</div>
<input class="input" id="productMultiplePrice" type="number" min="0"
max="999999999" placeholder="price" required>
</div>
</div>
<div class="col-2 form-group form-group--lg priceContent"
data-option="multiplePrice">
<button type="button" class="button button--primary button--block"
onclick="addMultiplePrice()"><span class="button__text">Add</span>
</button>
</div>
<div class="col-12 col-md-6 form-group form-group--lg">
<label class="form-label">Quantity</label>
<div class="input-group input-group--prepend">
<input class="input" id="productQuantity" type="number" min="0"
max="100" placeholder="" required>
</div>
</div>
<div class="col-12 col-md-6 form-group form-group--lg">
<label class="form-label">Color</label>
<div class="input-group input-group--prepend">
<input class="input" id="productColor" type="text" placeholder="" required>
</div>
</div>
<div class="col-12 col-md-6 form-group form-group--lg">
<label class="form-label">Type</label>
<div class="input-group input-group--prepend">
<input class="input" id="productType" type="text" placeholder="" required>
</div>
</div>
<div class="col-12 col-md-6 form-group form-group--lg">
<label class="form-label">Size</label>
<div class="input-group input-group--prepend">
<input class="input" id="productSize" type="text" placeholder="" required>
</div>
</div>
</div>
<div class="add-product__submit">
<div class="modal__footer-button">
<button type="button" class="button button--primary button--block"
id="btnAddProduct" onclick="addProduct()"><span class="button__text"
id="loader">Add Product</span>
</button>
</div>
<div class="modal__footer-button"><a
class="button button--secondary button--block"
onclick="clearFields()"><span class="button__text">Cancel</span></a>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</main>
<?php require './addOn.php'; ?>
</body>
</html>