Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8842 anupam.sin 1
	#set($Integer = 0)
2
	#if($defaultAddressId)
3
		#set($defaultid = $Integer.parseInt($defaultAddressId))
4
	#else
5
		#set($defaultid = 0)
6
	#end
7
 
8
	#if($defaultStoreAddressId)
9
		#set($defaultStoreId = $Integer.parseInt($defaultStoreAddressId))
10
	#else
11
		#set($defaultStoreId = 0)
12
	#end
13
 
14
	#if(!$errorMsg.isEmpty())
15
		<div id="messageError">
16
			<span></span>
17
			<p>$errorMsg <br/></p>
18
		</div>
19
	#end
20
	<div id="proceedToPayContainer" style="float:left; width:100%">
21
		<div class="free-shipping left">
22
			<div class="label">Shipping to your area is <span class="orange">FREE</span>.</div>
23
			<div class="payment-modes-msg">
24
				We accept all <b>credit / debit cards</b> and <b>netbanking facilities</b>. You can also pay <b>Cash on Delivery</b>.
25
			</div>
26
			#if($selectedTab == "HotSpot")
27
				#set($visibility = "")
28
			#else
29
				#set($visibility = "invisibleDiv")
30
			#end
31
			<div id="inStoreLocationMsg" style="color:red; font-size:15px" class="$visibility">
32
				Pickup in store is currently available only for Delhi/NCR
33
			</div>
34
		</div>
35
		<form id="formProceedToPay" action="/proceed-to-pay" method="post">
36
			<input type="hidden" value="$defaultid" name="addressid" id="addressid">
37
			<input type="hidden" name="deliveryLocation" value="$selectedTab" id="tabSelector">
38
			<input type="hidden" name="hotSpotAddressId" value="$defaultStoreId" id="hotSpotAddressId">
39
		</form>
40
		<div id="proceedToPay" class="cartflow-main-action-button right">PROCEED TO PAYMENT &gt;</div>
41
	</div>	
42
		#if($items)
43
		<div class="cart-container left">
44
			<table id="cartDetail" cellpadding="0" cellspacing="0" class="left">
45
				<thead>
46
					<tr>
47
						<th width="212" class="first">Item &amp; Color</th>
48
						<th width="117">Delivery Time</th>
49
						<th width="99">Total Price </th>
50
                    </tr>
51
                </thead>
52
				<tbody>
53
				#foreach($item in $items)
54
					#if($item.get("SHIPPING_TIME") == -1)
55
						#set($locationServiceable = 0)
56
						#set($messageShippingTime = "Location not serviceable")
57
					#else
58
						#set($locationServiceable = 1)
59
						#set($messageShippingTime = $item.get("SHIPPING_TIME"))
60
					#end
61
					<tr>
62
						#set($style='')
63
						#if(!$item.get("INSURER").equals("0"))
64
							#set($style = 'background: white url("/images/insuredStamp.png") no-repeat right;background-size: 76px;')
65
						#end
66
						<td style='$style'>
67
							<div class="cart-item-name-div padding5">
68
                                <span class="cart-item-name">$item.get("ITEM_NAME")</span><br/>
69
								<span class="cart-item-color">$item.get("ITEM_COLOR")</span>
70
						#if($item.get("BEST_DEAL_TEXT"))
71
								<div class="cart-item-best-deal-text">$item.get("BEST_DEAL_TEXT")</div>
72
						#end
73
                            </div>
74
                        </td>
75
						<td id="shipping_time_$item.get("ITEM_ID")">$messageShippingTime</td>
76
						<td>
77
							<img src="/images/rupee-symbol.png" alt="Rs." /> 
78
							$item.get("TOTAL_PRICE")<br />(for $item.get("ITEM_QUANTITY") pcs)
79
						</td>
80
                    </tr>
81
				#end
82
				#if($couponcode != "")
83
					#set($cssClass = "")
84
				#else
85
					#set($cssClass = "payable")
86
				#end
87
				#if($totalInsurance != "0.00")
88
					<tr>
89
						<td colspan ='2' class='label' style='border:none;'>1 Year WorldWide Theft Insurance</td>
90
						<td style='border:none;'><img src="/images/rupee-symbol.png" alt="Rs." /> $totalInsurance</td>
91
					</tr>
92
				#end
93
				#if($couponcode == "")
94
				<tr>
95
					<td colspan='2' class="label">SHIPPING</td>
96
					<td class="orange">FREE</td>
97
				</tr>
98
				<tr class="total-amount payable" style='background-color:#FFFFCC;font-size:14px;font-weight:bold;'>
99
					<td colspan='2' class="label">Total Amount</td>
100
					<td><img src="/images/rupee-symbol.png" alt="Rs." /> $totalamount</td>
101
				</tr>
102
				#else
103
				<tr class="total-amount">
104
    				<td colspan='2' class="label" style='border:none;'>Coupon <span style='font-weight:bold;color:#2789C1;font-size:14px;'>$couponcode</span></td>
105
    				<td style='border:none;'><img src="/images/rupee-symbol.png" alt="Rs." /> $discount</td>
106
				</tr>
107
				<tr>
108
					<td colspan='2' class="label">SHIPPING</td>
109
					<td class="orange">FREE</td>
110
				</tr>
111
				<tr class="discounted-amount payable" style='background-color:#FFFFCC;font-size:14px;font-weight:bold;'>
112
					<td colspan='2' class="label">Total Amount</td>
113
					<td id="discountedAmount"><img src="/images/rupee-symbol.png" alt="Rs." /> $discountedamount</td>
114
				</tr>
115
				#end
116
                </tbody>
117
            </table>
118
        </div>
119
		#end
120
		#if($insuranceDetailsRequired.equals("standAlone"))
121
    		<div id="insuranceDetailDiv" style="margin-bottom:10px;box-shadow: 0 0 5px 0px #AAA inset;padding:10px;border: 1px solid #AAA;float:right;width: 472px;">
122
    			<div id='thanks' style='display:none;color:#2789c1;font-size:14px;text-align:center;'>Thank you!</div>
123
            	<h3>Please enter the following details</h3>
124
            	<form id="insuranceDetailsForm" style="padding:7px 7px 0 7px;">
125
            		   <div style="margin-bottom:7px;">
126
            			<span style="font-size:13px;color:#444;display:inline-block;width: 42%;text-align: right;padding-right: 5px;">Father's/Husband's Name : </span>
127
            			<span style="display:inline-block;width:55%;">
128
            				<input id='guardianName' class='insuranceDetailField' name="guardianName" type="text">
129
            			</span>
130
            		</div>
131
            		<div style="margin-bottom:7px;">
132
            		   	<span style="font-size:13px;color:#444;display:inline-block;width: 42%;text-align: right;padding-right: 5px;">Date of Birth (dd/mm/yyyy) : </span>
133
            			<span style="display:inline-block;width:55%;">
134
            				<input id='dob' name="dob" class='insuranceDetailField' type="text" style='color:#999;' value='Example: 18/08/1986'>
135
            			</span>
136
            			<input id="insuranceType" type="hidden" name="insuranceType" value="">
137
            		</div>
138
					<div id='insDetErr' style="display:none;border: 1px solid red;padding: 7px;text-align: center;color: red;font-size: 14px;margin: 0 -5px 0 -5px;background-color: lightyellow;box-shadow: 0 0 3px 0 red inset;">
139
					</div>
140
            		<div style="margin:13px 5px 13px 0;text-align: right;">
141
            			<input id='submitInsuranceDetails' type="button" value="Submit" style="height: 25px;width: 125px;background-color: skyblue;color: black;font-weight: bold;">
142
            		</div>
143
            		<div id="insuranceHelpInfo" style="border-top:1px solid #999;color:#777;font-size:13px;padding:5px;">
144
            				We need these details for the purpose of insurance.<br>
145
            				If you do not wish to take insurance <a id="cancelInsurance" style="cursor:pointer">click here</a><br>
146
            				If this product is being billed in the name of an institution <a id="companyInsurance" style="cursor:pointer">click here</a>
147
            		</div>
148
            	</form>
149
            </div>
150
		#end
151
		<div id="main-right-container">
152
			#set($myLocation-tab-status = "selected-tab")
153
			#set($hotSpot-tab-status = "unselected-tab")
154
			#set($shipping-div-status = "")
155
 
156
			#set($billing-and-store-div-status = "hidden-div")
157
			#if($selectedTab == "HotSpot")
158
				#set($myLocation-tab-status = "unselected-tab")
159
				#set($hotSpot-tab-status = "selected-tab")
160
				#set($shipping-div-status = "hidden-div")
161
				#set($billing-and-store-div-status = "")
162
			#end
163
			<div id="tab-container">
164
    			<div id="tab-left" class=$myLocation-tab-status>DELIVER TO MY ADDRESS</div>
165
    			<div class=$hotSpot-tab-status id="tab-right" style="padding: 5px 9px 3px 39px; margin-right: 0px; width: 190px; text-align: left; margin-top: 13px; border-top-width: 1px;">PICKUP IN STORE
166
                     <a style="padding-left:2px" href="javascript:void(0)" id="pickupstoreInfo">
167
		 				<img id="whats-this" style="vertical-align:middle" src="/images/quesmark.png">
168
		 			</a>
169
				</div>
170
			</div>
171
 
172
			<div id="store-address-div" class=$billing-and-store-div-status>
173
    			<div id="hotspot-address-heading" class="label">
174
					<div id="store-address-header-text" class="address-header-text">&nbsp;Select a pickup point (<b>$storeAddresses.size()</b> stores available)</div>
175
					<div id="zone-selector-div">
176
						<select id="zone-selector">
177
							#foreach($zone in $allZones)
178
								#if($zone == "All")
179
									<option id="$zone" value="$zone" >Select Zone</option>
180
								#else
181
    								#set($stringWithoutSpace = $zone.replace(" ", "_"))
182
    								<option id="$stringWithoutSpace" value="$stringWithoutSpace" >$zone</option>
183
								#end
184
							#end
185
						</select>
186
					</div>
187
				</div>
188
    			<div id="store-address-container">
189
            		<table id="store-addresses" class="shipping-page-addresses right">
190
            			<tbody>
191
                    		#foreach($storeAddress in $storeAddresses)
192
                    			#set($storeAddressId = $storeAddress.getId())
193
 
194
                    			#if($defaultStoreId == $storeAddressId)
195
                    				#set($cssClassDefault = "default-address")
196
                    			#else
197
                    				#set($cssClassDefault = "")
198
                    			#end
199
                    				<tr id="tr_$storeAddress.getId()" class="address $cssClassDefault" zone="$storeAddress.getZone().replace(" ", "_")">
200
                    					<td align="center" valign="top" class="radio">
201
                    			#if($defaultStoreId == $storeAddressId)
202
            						<img src="/images/RadioButton_Selected.png" />
203
            						<input type="hidden" id="selectedPincode" value="$storeAddress.getPin()" />
204
        						#else
205
                    				<img id="selectStoreAddress_$storeAddressId" class="store-address-selector-button" src="/images/RadioButton_Unselected.png" title="Select this Store for Shipment" />
206
                    						<form id="formChangeStoreAddressTo_$storeAddressId" method="post" action="/shipping">
207
												<input type="hidden" name="selectedTab" value="HotSpot" />
208
												<input type="hidden" name="addressid" value="$storeAddressId" />
209
												<input type="hidden" name="action" value="change" />
210
        									</form>
211
                    			#end
212
                                        </td>
213
                    					<td class="detail">
214
                    						#if($storeAddress.getName())
215
                    							<b>$storeAddress.getName()</b><br />
216
                            				#end
217
                            				#if($storeAddress.getLine1())
218
                    							<label>$storeAddress.getLine1() </label><br />
219
                            				#end	
220
                            				#if($storeAddress.getLine2() != "")
221
                    							<label>$storeAddress.getLine2()</label><br />
222
                            				#end
223
                            				#if($storeAddress.getCity())	
224
                    							<label>$storeAddress.getCity()</label><br />
225
                            				#end
226
                            				#if($storeAddress.getState())
227
                    							<label>$storeAddress.getState()</label><br />
228
                            				#end
229
                            				#if($storeAddress.getPin())	
230
                    							<label>Pin: $storeAddress.getPin()</label>
231
                    						#end
232
                                            </p>
233
                            				#if($storeAddress.getPhone())
234
                                            <b>Phone: $storeAddress.getPhone() </b>
235
                            				#end
236
                                        </td>
237
                                    </tr>
238
                    		#end
239
                        </tbody>
240
                    </table>
241
    			</div><!--End of store address container-->
242
			</div>
243
			<div id="billing-address-div" class=$billing-and-store-div-status>
244
    			<div id="billing-address-header" class="address-header label left">
245
    				<div id="billing-address-header-text" class="address-header-text">Select Billing Address</div>
246
    				<button id="addAddress" class="right">+ Add New Address</button>
247
    			</div>
248
    			<div id="billing-address-container">
249
    				<table id="billing-addresses" class="shipping-page-addresses right">
250
            			<thead></thead>
251
            			<tbody>
252
            		#set($shipAddressEmpty = 1)
253
            		#foreach($address in $addresses)
254
            			#set($shipAddressEmpty = 0)
255
            			#set($addressId = $address.getId())
256
 
257
            			#if($defaultid == $addressId)
258
            				#set($cssClassDefault = "default-address")
259
            			#else
260
            				#set($cssClassDefault = "")
261
            			#end
262
            				<tr id="tr_$address.getId()" class="address $cssClassDefault">
263
            					<td align="center" valign="top" class="radio">
264
            			#if($defaultid == $addressId)
265
            				#set($shipAddressEmpty = 0)
266
							<img id="selectAddress_$addressId" class="dummy-class" src="/images/RadioButton_Selected.png" title="Select this Address for Shipment" />
267
            						<!--<input type="hidden" id="selectedPincode" value="$address.getPin()" />-->
268
            			#else
269
            					    <img id="selectAddress_$addressId" class="billing-address-selector-button" src="/images/RadioButton_Unselected.png" title="Select this Address for Shipment" />
270
            						<!--<form id="formChangeAddressTo_$addressId" method="post" action="/shipping?action=change&selectedTab=HotSpot&addressid=$addressId">
271
									</form>-->
272
            			#end
273
                                </td>
274
            					<td class="detail">
275
            						#if($address.getName())
276
            							<b>$address.getName()</b><br />
277
                    				#end
278
                    				#if($address.getLine1())
279
            							<label>$address.getLine1() </label><br />
280
                    				#end	
281
                    				#if($address.getLine2() != "")
282
            							<label>$address.getLine2()</label><br />
283
                    				#end
284
                    				#if($address.getCity())	
285
            							<label>$address.getCity()</label><br />
286
                    				#end
287
                    				#if($address.getState())
288
            							<label>$address.getState()</label><br />
289
                    				#end
290
                    				#if($address.getPin())	
291
            							<label>Pin: $address.getPin()</label>
292
            						#end
293
                                    </p>
294
                    				#if($address.getPhone())
295
                                    <b>Phone: $address.getPhone() </b>
296
                    				#end
297
                                </td>
298
            					<!--<td class="delete">
299
            						<img id="delete_$addressId" class="delete-address" src="/images/Cross_DeleteRow_DEF.png" title="Delete this Address"/>
300
								</td>-->
301
                            </tr>
302
            		#end
303
            		#if($shipAddressEmpty!=0)
304
                            <tr><td colspan="2">You do not have an address linked to your profile. Please add one.</td></tr>
305
            		#end
306
            			<input type="hidden" id="addressEmpty" value="$shipAddressEmpty">
307
                        </tbody>
308
                    </table>
309
    			</div>
310
			</div>
311
			<div id="shipping-address-div" class=$shipping-div-status>
312
    			<div id="shipping-address-header" class="address-header label left">
313
    				<div id="shipping-address-header-text" class="address-header-text">Select Shipping Address</div>
314
    				<button id="addAddress" class="right">+ Add New Address</button>
315
    			</div>
316
    			<div id="shipping-address-container">
317
    				<table id="shipping-addresses" class="shipping-page-addresses right">
318
            			<thead></thead>
319
            			<tbody>
320
            		#set($shipAddressEmpty = 1)
321
            		#foreach($address in $addresses)
322
            			#set($shipAddressEmpty = 0)
323
            			#set($addressId = $address.getId())
324
 
325
            			#if($defaultid == $addressId)
326
            				#set($cssClassDefault = "default-address")
327
            			#else
328
            				#set($cssClassDefault = "")
329
            			#end
330
            				<tr id="tr_$address.getId()" class="address $cssClassDefault">
331
            					<td align="center" valign="top" class="radio">
332
            			#if($defaultid == $addressId)
333
            				#set($shipAddressEmpty = 0)
334
            						<img src="/images/RadioButton_Selected.png" />
335
            						<input type="hidden" id="selectedPincode" value="$address.getPin()" />
336
            			#else
337
            					    <img id="selectAddress_$addressId" class="button-address-select" src="/images/RadioButton_Unselected.png" title="Select this Address for Shipment" />
338
            						<form id="formChangeAddressTo_$addressId" method="post" action="/shipping?action=change&selectedTab=myLocation&addressid=$addressId">
339
									</form>
340
            			#end
341
                                </td>
342
            					<td class="detail">
343
            						#if($address.getName())
344
            							<b>$address.getName()</b><br />
345
                    				#end
346
                    				#if($address.getLine1())
347
            							<label>$address.getLine1() </label><br />
348
                    				#end	
349
                    				#if($address.getLine2() != "")
350
            							<label>$address.getLine2()</label><br />
351
                    				#end
352
                    				#if($address.getCity())	
353
            							<label>$address.getCity()</label><br />
354
                    				#end
355
                    				#if($address.getState())
356
            							<label>$address.getState()</label><br />
357
                    				#end
358
                    				#if($address.getPin())	
359
            							<label>Pin: $address.getPin()</label>
360
            						#end
361
                                    </p>
362
                    				#if($address.getPhone())
363
                                    <b>Phone: $address.getPhone() </b>
364
                    				#end
365
                                </td>
366
                            </tr>
367
            		#end
368
            		#if($shipAddressEmpty!=0)
369
                            <tr><td colspan="2">You do not an shipping address linked to your profile. Please add one.</td></tr>
370
            		#end
371
            			<input type="hidden" id="addressEmpty" value="$shipAddressEmpty">
372
                        </tbody>
373
                    </table>
374
    			</div>
375
			</div>
376
 
377
		#if($shipAddressEmpty == 1)
378
			<input type="hidden" id="canProceedToPay" value="0" />
379
			<input type="hidden" id="reasonActionDisability" value="No address selected" />
380
		#elseif($locationServiceable == 0)
381
			<input type="hidden" id="canProceedToPay" value="0" />
382
			<input type="hidden" id="reasonActionDisability" value="Location not serviceable. Please specify a different address" />
383
		#else
384
			<input type="hidden" id="canProceedToPay" value="1" />
385
		#end
386
		<!-- Add Shipping Detail Start-->
387
        <form name="frmShippingAddress" id="frmShippingAddress" method="post" action="/shipping" class="right">
388
			<table cellpadding="0" cellspacing="0">
389
				<thead>
390
					<tr class="header">
391
						#if($selectedTab == "HotSpot")
392
							<td id="newAddressFormHeading" colspan="2">Enter the address which you want printed on the bill</td>
393
						#else
394
							<td id="newAddressFormHeading" colspan="2">Enter the address where you want the items to be delivered</td>
395
						#end
396
					</tr>
397
                </thead>
398
				<tbody>
399
					<tr>
400
						<td>&nbsp;</td>
401
						<td class="instruction">All Fields are required</td>
402
                    </tr>
403
					#if($insuranceDetailsRequired.equals("inForm"))
404
						<tr>
405
        					<td class="label" align="right"><sup>*</sup>Father's/Husband's Name:</td>
406
        					<td class="input">
407
        						<input type="text" id="guardianName" name="guardianName" class="searchbox right" >
408
    							</input>
409
        					</td>
410
        				</tr>
411
						<tr>
412
        					<td class="label" align="right"><sup>*</sup>Date of Birth (dd/mm/yyyy):</td>
413
        					<td class="input">
414
        						<input type="text" id="dob" name="dob" style='color:#999;' value='Example: 18/08/1986' class="searchbox right" >
415
    							</input>
416
        					</td>
417
        				</tr>
418
						<tr >
419
							<td colspan="2">
420
								<div id="insDetErr" style="display:none;border: 1px solid red;padding: 7px;text-align: center;color: red;font-size: 14px;margin: 0 -5px 0 -5px;background-color: lightyellow;box-shadow: 0 0 3px 0 red inset;">
421
								</div>
422
							</td>
423
						</tr>
424
						<tr id="insuranceHelpInfo">
425
							<td colspan="2" style="color:#777;font-size:13px;padding:5px;">
426
                				We need the above details for the purpose of insurance.<br>
427
                				If you do not wish to take insurance <a id="cancelInsurance" style="cursor:pointer">click here</a><br>
428
								<hr>
429
							</td>	
430
						</tr>
431
					#end
432
					<tr>
433
    					<td class="label" align="right"><sup>*</sup>Name:</td>
434
    					<td class="input">
435
    						<input type="text" id="shipName" name="name" class="searchbox right" >
436
							</input>
437
    					</td>
438
    				</tr>
439
                    <tr>
440
    					<td class="label" align="right"><sup>*</sup>Address Line 1:</td>
441
    					<td class="input">
442
    						<input type="text" id="shipAddress1" name="line1" class="searchbox right" />
443
    					</td>
444
    				</tr>
445
                    <tr>
446
    					<td class="label" align="right">Address Line 2:</td>
447
    					<td class="input">
448
    						<input type="text" id="shipAddress2" name="line2" class="searchbox right" />
449
    					</td>
450
    				</tr>
451
                    <tr>
452
    					<td class="label" align="right"><sup>*</sup>State</td>
453
    					<td class="input">
454
    						<select class="select_state" name="state" id="shipState">
455
    						#include("templates/stateslist.vm")
456
    						</select>
457
    					</td>
458
    				</tr>
459
                    <tr>
460
    					<td class="label" align="right"><sup>*</sup>City:</td>
461
    					<td class="input">
462
    						<input type="text" id="shipCity" name="city" class="searchbox"/>
463
    					</td>
464
    				</tr>
465
                    <tr>
466
    					<td class="label" align="right"><sup>*</sup>Pin Code:</td>
467
    					<td class="input">
468
    						<input type="text" id="shipPin" name="pincode" value="" class="searchbox textbox-pincode" />
469
    					</td>
470
    				</tr>
471
                    <tr>
472
    					<td class="label" align="right"><sup>*</sup>Phone:</td>
473
    					<td class="input">
474
    						<input type="text" id="shipPhone" name="phone" value="" class="searchbox right" />
475
    					</td>
476
    				</tr>
477
                    <tr>
478
    					<td colspan="2" align="center">
479
    						<input type="hidden" name="action" value="add" />
480
    						<input type="submit"  id="submitAddress" value="Save" class="new-button" />
481
    						<a id="closeAddAddressForm">Close</a>
482
    					</td>
483
    				</tr>
484
    				<tr>
485
    					<td>&nbsp;</td>
486
    					<td class="instruction">This will be added to your list of addresses</td>
487
    				</tr>
488
                </tbody>
489
			</table>
490
			#if($selectedTab == "HotSpot")
491
				<input id="tabSelectorForAddAddressForm" type="hidden" name="selectedTab" value="HotSpot" />
492
			#else
493
				<input id="tabSelectorForAddAddressForm" type="hidden" name="selectedTab" value="myLocation" />
494
			#end
495
		</form>
496
	</div><!--End of main-right- Container-->