| 21987 |
kshitij.so |
1 |
<style>
|
|
|
2 |
.row{
|
|
|
3 |
margin:0 auto;
|
|
|
4 |
}
|
|
|
5 |
.modal-content{
|
|
|
6 |
background : white;
|
|
|
7 |
}
|
|
|
8 |
.modelHeaderCustom{
|
|
|
9 |
font-size:14px;
|
|
|
10 |
font-weight:bold;
|
|
|
11 |
}
|
|
|
12 |
.border-highlight{
|
|
|
13 |
border : 3px solid red;
|
|
|
14 |
}
|
|
|
15 |
hr{
|
|
|
16 |
background-color:#007aff;
|
|
|
17 |
border:none;
|
|
|
18 |
height:1px;
|
|
|
19 |
background:#007aff;
|
|
|
20 |
}
|
|
|
21 |
.control-label {
|
|
|
22 |
margin-top: 0;
|
|
|
23 |
margin-bottom: 0;
|
|
|
24 |
padding-top: 7px;
|
|
|
25 |
font-weight:bold;
|
|
|
26 |
font-size:14px;
|
|
|
27 |
}
|
|
|
28 |
.form-group{
|
|
|
29 |
border-bottom: 1px solid #eff2f7;
|
|
|
30 |
padding-bottom: 15px;
|
|
|
31 |
margin-bottom: 15px;
|
|
|
32 |
}
|
|
|
33 |
.right{
|
|
|
34 |
float:right;
|
|
|
35 |
}
|
|
|
36 |
.form-control{
|
|
|
37 |
color:black;
|
|
|
38 |
text-transform:uppercase;
|
|
|
39 |
}
|
|
|
40 |
}
|
|
|
41 |
</style>
|
|
|
42 |
<section class="wrapper">
|
|
|
43 |
<div class="row">
|
|
|
44 |
<div class="col-lg-12">
|
|
|
45 |
<h3 class="page-header"><i class="icon_table"></i>Order</h3>
|
|
|
46 |
<ol class="breadcrumb">
|
| 22078 |
ashik.ali |
47 |
<li><i class="fa fa-home"></i><a href="${appContextPath}dashboard">Home</a></li>
|
| 21987 |
kshitij.so |
48 |
<li><i class="icon_table"></i>ORDER</li>
|
|
|
49 |
</ol>
|
|
|
50 |
</div>
|
|
|
51 |
</div>
|
|
|
52 |
<form id="cd">
|
|
|
53 |
<div id="customer-details" style="background:white;background-color:white;padding:1%;">
|
|
|
54 |
<h4 class="modelHeaderCustom" style="text-align:center;font-size:22px;margin-bottom:3%;">Customer Information</h4>
|
|
|
55 |
<div class="row">
|
|
|
56 |
<div class="col-lg-6">
|
|
|
57 |
<div class="row form-group">
|
|
|
58 |
<label class="control-label col-lg-6">Customer Name</label>
|
|
|
59 |
<div class="col-lg-6">
|
|
|
60 |
<input id="name" name="name" type="text" value="" class="form-control">
|
|
|
61 |
</div>
|
|
|
62 |
</div>
|
|
|
63 |
<div class="row form-group">
|
|
|
64 |
<label class="control-label col-lg-6">Phone</label>
|
|
|
65 |
<div class="col-lg-6">
|
|
|
66 |
<input id="phone" name="phone" type="text" value="" class="form-control">
|
|
|
67 |
</div>
|
|
|
68 |
</div>
|
|
|
69 |
<div class="row form-group">
|
|
|
70 |
<label class="control-label col-lg-6">Email</label>
|
|
|
71 |
<div class="col-lg-6">
|
|
|
72 |
<input id="email" name="email" type="text" value="" class="form-control">
|
|
|
73 |
</div>
|
|
|
74 |
</div>
|
|
|
75 |
<div class="row form-group">
|
|
|
76 |
<label class="control-label col-lg-6">Alternate Phone Number</label>
|
|
|
77 |
<div class="col-lg-6">
|
|
|
78 |
<input id="alternatePhone" name="alternatePhone" type="text" value="" class="form-control">
|
|
|
79 |
</div>
|
|
|
80 |
</div>
|
|
|
81 |
<div class="row form-group">
|
|
|
82 |
<label class="control-label col-lg-6">Address Line1</label>
|
|
|
83 |
<div class="col-lg-6">
|
|
|
84 |
<input id="line1" name="line1" type="text" size="50" value="" class="form-control">
|
|
|
85 |
</div>
|
|
|
86 |
</div>
|
|
|
87 |
</div>
|
|
|
88 |
<div class="col-lg-6">
|
|
|
89 |
<div class="row form-group">
|
|
|
90 |
<label class="control-label col-lg-6">Address Line2</label>
|
|
|
91 |
<div class="col-lg-6">
|
|
|
92 |
<input id="line2" name="line2" type="text" value="" class="form-control">
|
|
|
93 |
</div>
|
|
|
94 |
</div>
|
|
|
95 |
<div class="row form-group">
|
|
|
96 |
<label class="control-label col-lg-6">Landmark</label>
|
|
|
97 |
<div class="col-lg-6">
|
|
|
98 |
<input id="landmark" name="landmark" type="text" value="" class="form-control">
|
|
|
99 |
</div>
|
|
|
100 |
</div>
|
|
|
101 |
<div class="row form-group">
|
|
|
102 |
<label class="control-label col-lg-6">City</label>
|
|
|
103 |
<div class="col-lg-6">
|
|
|
104 |
<input id="city" name="city" type="text" value="" class="form-control">
|
|
|
105 |
</div>
|
|
|
106 |
</div>
|
|
|
107 |
<div class="row form-group">
|
|
|
108 |
<label class="control-label col-lg-6">State</label>
|
|
|
109 |
<div class="col-lg-6">
|
|
|
110 |
<select class="form-control" name = "state" placeholder="State">
|
|
|
111 |
<option value="Andaman and Nicobar Islands">Andaman and Nicobar Islands</option>
|
|
|
112 |
<option value="Andhra Pradesh">Andhra Pradesh</option>
|
|
|
113 |
<option value="Arunachal Pradesh">Arunachal Pradesh</option>
|
|
|
114 |
<option value="Assam">Assam</option>
|
|
|
115 |
<option value="Bihar">Bihar</option>
|
|
|
116 |
<option value="Chandigarh">Chandigarh</option>
|
|
|
117 |
<option value="Chhattisgarh">Chhattisgarh</option>
|
|
|
118 |
<option value="Dadra and Nagar Haveli">Dadra and Nagar Haveli</option>
|
|
|
119 |
<option value="Daman and Diu">Daman and Diu</option>
|
|
|
120 |
<option value="Delhi">Delhi</option>
|
|
|
121 |
<option value="Goa">Goa</option>
|
|
|
122 |
<option value="Gujarat">Gujarat</option>
|
|
|
123 |
<option value="Haryana">Haryana</option>
|
|
|
124 |
<option value="Himachal Pradesh">Himachal Pradesh</option>
|
|
|
125 |
<option value="Jammu and Kashmir">Jammu and Kashmir</option>
|
|
|
126 |
<option value="Jharkhand">Jharkhand</option>
|
|
|
127 |
<option value="Karnataka">Karnataka</option>
|
|
|
128 |
<option value="Kerala">Kerala</option>
|
|
|
129 |
<option value="Lakshadweep">Lakshadweep</option>
|
|
|
130 |
<option value="Madhya Pradesh">Madhya Pradesh</option>
|
|
|
131 |
<option value="Maharashtra">Maharashtra</option>
|
|
|
132 |
<option value="Manipur">Manipur</option>
|
|
|
133 |
<option value="Meghalaya">Meghalaya</option>
|
|
|
134 |
<option value="Mizoram">Mizoram</option>
|
|
|
135 |
<option value="Nagaland">Nagaland</option>
|
|
|
136 |
<option value="Orissa">Orissa</option>
|
|
|
137 |
<option value="Pondicherry">Pondicherry</option>
|
|
|
138 |
<option value="Punjab">Punjab</option>
|
|
|
139 |
<option value="Rajasthan">Rajasthan</option>
|
|
|
140 |
<option value="Sikkim">Sikkim</option>
|
|
|
141 |
<option value="Tamil Nadu">Tamil Nadu</option>
|
|
|
142 |
<option value="Tripura">Tripura</option>
|
|
|
143 |
<option value="Telangana">Telangana</option>
|
|
|
144 |
<option value="Uttaranchal">Uttaranchal</option>
|
|
|
145 |
<option value="Uttar Pradesh">Uttar Pradesh</option>
|
|
|
146 |
<option value="West Bengal">West Bengal</option>
|
|
|
147 |
</select>
|
|
|
148 |
</div>
|
|
|
149 |
</div>
|
|
|
150 |
<div class="row form-group">
|
|
|
151 |
<label class="control-label col-lg-6">Pincode</label>
|
|
|
152 |
<div class="col-lg-6">
|
|
|
153 |
<input id="pincode" name="pincode" type="text" value="" class="form-control">
|
|
|
154 |
</div>
|
|
|
155 |
</div>
|
|
|
156 |
</div>
|
|
|
157 |
</div>
|
|
|
158 |
</div>
|
|
|
159 |
<div id="order-details" style="background:white;background-color:white;">
|
|
|
160 |
#if($cartObj.size()==0)
|
|
|
161 |
<div class="card row"
|
|
|
162 |
<p>Your Cart is Empty.</p>
|
|
|
163 |
</div>
|
|
|
164 |
#else
|
|
|
165 |
<h4 class="modelHeaderCustom" style="text-align:center;font-size:22px;margin-bottom:3%;">Product Information</h4>
|
|
|
166 |
#foreach ($cartItem in $cartObj)
|
|
|
167 |
<div class="row">
|
|
|
168 |
<div class="col-sm-4">
|
|
|
169 |
<h4 class="grnProductInfo modelHeaderCustom">Product Details : <span>$cartItem.getDisplayName()</span></h4>
|
|
|
170 |
</div>
|
|
|
171 |
<div class="col-sm-2">
|
|
|
172 |
<h4 class="grnProductInfo modelHeaderCustom">Quantity : <span>$cartItem.getQuantity()</span></h4>
|
|
|
173 |
</div>
|
|
|
174 |
<div class="col-sm-3">
|
|
|
175 |
<h4 class="grnProductInfo modelHeaderCustom">Unit Price : <input type="number" class="unitPrice" name="unitPrice" quantity="$cartItem.getQuantity()" value="0" itemId="$cartItem.getItemId()"></h4>
|
|
|
176 |
</div>
|
|
|
177 |
<div class="col-sm-3">
|
|
|
178 |
<h4 class="grnProductInfo modelHeaderCustom">Total Price : <input name="totalPrice" class="totalPrice" itemId="$cartItem.getItemId()" type="number" value="0" readonly></h4>
|
|
|
179 |
</div>
|
|
|
180 |
</div>
|
|
|
181 |
#if($cartItem.getItemType() =="SERIALIZED")
|
|
|
182 |
<div class="row">
|
|
|
183 |
<div class="col-sm-4">
|
|
|
184 |
<h4 class="modal-title">Enter Serial Numbers</h4>
|
|
|
185 |
</div>
|
|
|
186 |
</div>
|
|
|
187 |
<div class="row">
|
|
|
188 |
#foreach ($number in [1..$cartItem.getQuantity()])
|
|
|
189 |
<div class="col-sm-3"><div class="input-group"><input type="text" itemId="$cartItem.getItemId()" name="serialNumber" class="serialNumber form-control"></div></div>
|
|
|
190 |
#end
|
|
|
191 |
</div>
|
|
|
192 |
#end
|
|
|
193 |
<hr>
|
|
|
194 |
#end
|
|
|
195 |
</div>
|
|
|
196 |
#end
|
|
|
197 |
|
|
|
198 |
<div id="payment-details" style="background:white;background-color:white;">
|
|
|
199 |
<div class="row">
|
|
|
200 |
<div class="col-lg-6 right">
|
|
|
201 |
<div class="col-lg-6">
|
|
|
202 |
<h4 class="grnProductInfo modelHeaderCustom right">Net Payable Amount :</h4>
|
|
|
203 |
</div>
|
|
|
204 |
<div class="col-lg-6">
|
|
|
205 |
<input type="number" class="netPayableAmount form-control" name="" value="0" readonly class="form-control">
|
|
|
206 |
</div>
|
|
|
207 |
</div>
|
|
|
208 |
</div>
|
|
|
209 |
<p></p>
|
|
|
210 |
<div class="row">
|
|
|
211 |
<div class="col-lg-6 right">
|
|
|
212 |
<div class="col-lg-6">
|
|
|
213 |
<h4 class="grnProductInfo modelHeaderCustom right">Cash Amount:</h4>
|
|
|
214 |
</div>
|
|
|
215 |
<div class="col-lg-6">
|
|
|
216 |
<input type="number" name="CASH" class="form-control cashAmount amount" value="0">
|
|
|
217 |
</div>
|
|
|
218 |
</div>
|
|
|
219 |
</div>
|
|
|
220 |
<p></p>
|
|
|
221 |
<div class="row">
|
|
|
222 |
<div class="col-lg-6 right">
|
|
|
223 |
<div class="col-lg-6">
|
|
|
224 |
<h4 class="grnProductInfo modelHeaderCustom right">Debit/Credit Card Amount:</h4>
|
|
|
225 |
</div>
|
|
|
226 |
<div class="col-lg-6">
|
|
|
227 |
<input type="number" name="CARD" class="form-control cardAmount amount" value="0">
|
|
|
228 |
</div>
|
|
|
229 |
</div>
|
|
|
230 |
</div>
|
|
|
231 |
<p></p>
|
|
|
232 |
<div class="row">
|
|
|
233 |
<div class="col-lg-6 right">
|
|
|
234 |
<div class="col-lg-6">
|
|
|
235 |
<h4 class="grnProductInfo modelHeaderCustom right">PayTm Amount:</h4>
|
|
|
236 |
</div>
|
|
|
237 |
<div class="col-lg-6">
|
|
|
238 |
<input type="number" name="PAYTM" class="form-control walletAmount amount" value="0">
|
|
|
239 |
</div>
|
|
|
240 |
</div>
|
|
|
241 |
</div>
|
|
|
242 |
</div>
|
|
|
243 |
</div>
|
|
|
244 |
<div id="create-order" style="padding:10px;">
|
|
|
245 |
<div class="row">
|
|
|
246 |
<div class="col-xs-3" style="float:right;">
|
|
|
247 |
<button class="btn btn-primary order-checkout" type="submit" style="width:100%;border-radius:0px;">Create Order</button>
|
|
|
248 |
</div>
|
|
|
249 |
</div>
|
|
|
250 |
</div>
|
|
|
251 |
</form>
|
|
|
252 |
</section>
|
|
|
253 |
<script>
|
|
|
254 |
$().ready(function() {
|
|
|
255 |
$("form#cd input").each(function(){
|
|
|
256 |
$(this).attr('autocomplete', 'off');
|
|
|
257 |
});
|
|
|
258 |
});
|
|
|
259 |
</script>
|
|
|
260 |
<script>
|
|
|
261 |
$().ready(function() {
|
|
|
262 |
// validate the comment form when it is submitted
|
|
|
263 |
$('#cd').validate({
|
|
|
264 |
rules:{
|
|
|
265 |
name:{
|
|
|
266 |
required:true
|
|
|
267 |
},
|
|
|
268 |
email:{
|
|
|
269 |
required:true,
|
|
|
270 |
email:true
|
|
|
271 |
|
|
|
272 |
},
|
|
|
273 |
line1:{
|
|
|
274 |
required:true
|
|
|
275 |
},
|
|
|
276 |
state:{
|
|
|
277 |
required:true
|
|
|
278 |
},
|
|
|
279 |
city:{
|
|
|
280 |
required:true
|
|
|
281 |
},
|
|
|
282 |
pincode:{
|
|
|
283 |
required:true,
|
|
|
284 |
digits:true,
|
|
|
285 |
minlength: 6,
|
|
|
286 |
maxlength: 6,
|
|
|
287 |
},
|
|
|
288 |
phone:{
|
|
|
289 |
required:true,
|
|
|
290 |
minlength:10,
|
|
|
291 |
maxlength:10,
|
|
|
292 |
digits:true
|
|
|
293 |
},
|
|
|
294 |
},
|
|
|
295 |
messages:{
|
|
|
296 |
name:{
|
|
|
297 |
required:"Please enter the name"
|
|
|
298 |
},
|
|
|
299 |
line1:{
|
|
|
300 |
required:"Please enter the address"
|
|
|
301 |
},
|
|
|
302 |
state:{
|
|
|
303 |
required: "Please select a state"
|
|
|
304 |
},
|
|
|
305 |
city:{
|
|
|
306 |
required: "Please enter the city"
|
|
|
307 |
},
|
|
|
308 |
email:{
|
|
|
309 |
require: "Please enter a valid email address"
|
|
|
310 |
},
|
|
|
311 |
pincode:{
|
|
|
312 |
required: "Please enter the pincode",
|
|
|
313 |
digits:"Please enter a valid pincode"
|
|
|
314 |
},
|
|
|
315 |
phone:{
|
|
|
316 |
required: "Please enter the phone number",
|
|
|
317 |
digits:"Please enter a valid number",
|
|
|
318 |
minlength:"Number should be of 10 digits"
|
|
|
319 |
}
|
|
|
320 |
},
|
|
|
321 |
submitHandler: function (form, event) {
|
|
|
322 |
event.preventDefault();
|
|
|
323 |
var payload = orderDetailsPayload();
|
|
|
324 |
if(!validateOrderDetails()){
|
|
|
325 |
alert("Please fix highlighted errors");
|
|
|
326 |
return false;
|
|
|
327 |
}
|
|
|
328 |
$.ajax({
|
|
|
329 |
type: "POST",
|
|
|
330 |
url: "create-order",
|
|
|
331 |
data: payload,
|
|
|
332 |
contentType:'application/json',
|
|
|
333 |
async: false,
|
|
|
334 |
success: function (data) {
|
|
|
335 |
alert("Purchase booked successfully");
|
|
|
336 |
},
|
|
|
337 |
error : function() {
|
|
|
338 |
alert("OOPS!!!Failed to do changes.Try Again.",'ERROR');
|
|
|
339 |
},
|
|
|
340 |
cache: false,
|
|
|
341 |
processData: false
|
|
|
342 |
});
|
|
|
343 |
return false; // required to block normal submit since you used ajax
|
|
|
344 |
}
|
|
|
345 |
});
|
|
|
346 |
});
|
|
|
347 |
</script>
|