Subversion Repositories SmartDukaan

Rev

Rev 5831 | Rev 6251 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3830 chandransh 1
	#set($Integer = 0)
2
	#if($defaultAddressId)
3
		#set($defaultid = $Integer.parseInt($defaultAddressId))
4
	#else
5
		#set($defaultid = 0)
6
	#end
7
 
5716 anupam.sin 8
	#if($defaultStoreAddressId && $defaultStoreAddressId != 0)
9
		#set($defaultStoreId = $Integer.parseInt($defaultStoreAddressId))
10
	#else
5746 anupam.sin 11
		#set($defaultStoreId = 0)
5716 anupam.sin 12
	#end
13
 
3830 chandransh 14
	#if(!$errorMsg.isEmpty())
15
		<div id="messageError">
16
			<span></span>
17
			<p>$errorMsg <br/></p>
18
		</div>
19
	#end
5920 anupam.sin 20
	<div id="proceedToPayContainer" style="float:left; width:100%">
3830 chandransh 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>
5920 anupam.sin 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>
3830 chandransh 34
		</div>
35
		<form id="formProceedToPay" action="/proceed-to-pay" method="post">
36
			<input type="hidden" value="$defaultid" name="addressid" id="addressid">
5716 anupam.sin 37
			<input type="hidden" name="deliveryLocation" value="$selectedTab" id="tabSelector">
38
			<input type="hidden" name="hotSpotAddressId" value="$defaultStoreId" id="hotSpotAddressId">
3830 chandransh 39
		</form>
3903 varun.gupt 40
		<div id="proceedToPay" class="cartflow-main-action-button right">PROCEED TO PAYMENT &gt;</div>
5920 anupam.sin 41
	</div>	
3830 chandransh 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") + " Bus. Days")
60
					#end
61
					<tr>
62
						<td>
63
							<div class="cart-item-name-div padding5">
4217 varun.gupt 64
                                <span class="cart-item-name">$item.get("ITEM_NAME")</span><br/>
3830 chandransh 65
								<span class="cart-item-color">$item.get("ITEM_COLOR")</span>
4225 varun.gupt 66
						#if($item.get("BEST_DEAL_TEXT"))
67
								<div class="cart-item-best-deal-text">$item.get("BEST_DEAL_TEXT")</div>
4217 varun.gupt 68
						#end
3830 chandransh 69
                            </div>
70
                        </td>
71
						<td id="shipping_time_$item.get("ITEM_ID")">$messageShippingTime</td>
72
						<td>
73
							<img src="/images/rupee-symbol.png" alt="Rs." /> 
74
							$item.get("TOTAL_PRICE")<br />(for $item.get("ITEM_QUANTITY") pcs)
75
						</td>
76
                    </tr>
77
				#end
78
                </tbody>
79
            </table>
80
			<table class="right net-amount" cellspacing="0">
81
				<tr>
82
					<td class="label">SHIPPING:</td>
83
					<td class="orange">FREE</td>
84
				</tr>
85
				#if($couponcode != "")
86
					#set($cssClass = "")
87
				#else
88
					#set($cssClass = "payable")
89
				#end
90
				<tr class="total-amount $cssClass">
91
					<td class="label">Total Amount:</td>
92
					<td><img src="/images/rupee-symbol.png" alt="Rs." /> $totalamount</td>
93
				</tr>
94
				#if($couponcode != "")
95
				<tr class="discounted-amount payable">
4923 varun.gupt 96
					<td class="label">Amount Payable:<br />(After Discount)</td>
3831 rajveer 97
					<td><img src="/images/rupee-symbol.png" alt="Rs." /> $discountedamount</td>
3830 chandransh 98
				</tr>
99
				#end
100
			</table>
101
        </div>
102
		#end
103
 
5716 anupam.sin 104
		<div id="main-right-container">
105
			#set($myLocation-tab-status = "selected-tab")
106
			#set($hotSpot-tab-status = "unselected-tab")
107
			#set($shipping-div-status = "")
108
			#set($billing-and-store-div-status = "hidden-div")
109
			#if($selectedTab == "HotSpot")
110
				#set($myLocation-tab-status = "unselected-tab")
111
				#set($hotSpot-tab-status = "selected-tab")
112
				#set($shipping-div-status = "hidden-div")
113
				#set($billing-and-store-div-status = "")
114
			#end
115
			<div id="tab-container">
116
    			<div id="tab-left" class=$myLocation-tab-status>DELIVER TO MY ADDRESS</div>
5810 anupam.sin 117
    			<div id="tab-right" class=$hotSpot-tab-status>PICKUP IN STORE
5765 anupam.sin 118
					<div id="pickup-tab-new-icon-container"></div>
119
				</div>
5716 anupam.sin 120
			</div>
5614 rajveer 121
 
5716 anupam.sin 122
			<div id="store-address-div" class=$billing-and-store-div-status>
123
    			<div id="hotspot-address-heading" class="label">
5765 anupam.sin 124
					<div id="store-address-header-text" class="address-header-text">&nbsp;Select a pickup point (<b>$storeAddresses.size()</b> stores available)</div>
5746 anupam.sin 125
					<div id="zone-selector-div">
126
						<select id="zone-selector">
127
							#foreach($zone in $allZones)
5751 anupam.sin 128
								#if($zone == "All")
129
									<option id="$zone" value="$zone" >Select Zone</option>
130
								#else
131
    								#set($stringWithoutSpace = $zone.replace(" ", "_"))
132
    								<option id="$stringWithoutSpace" value="$stringWithoutSpace" >$zone</option>
133
								#end
5746 anupam.sin 134
							#end
135
						</select>
136
					</div>
5716 anupam.sin 137
				</div>
138
    			<div id="store-address-container">
139
            		<table id="store-addresses" class="shipping-page-addresses right">
140
            			<tbody>
141
                    		#foreach($storeAddress in $storeAddresses)
142
                    			#set($storeAddressId = $storeAddress.getId())
143
 
144
                    			#if($defaultStoreId == $storeAddressId)
145
                    				#set($cssClassDefault = "default-address")
146
                    			#else
147
                    				#set($cssClassDefault = "")
148
                    			#end
5746 anupam.sin 149
                    				<tr id="tr_$storeAddress.getId()" class="address $cssClassDefault" zone="$storeAddress.getZone().replace(" ", "_")">
5716 anupam.sin 150
                    					<td align="center" valign="top" class="radio">
151
                    			#if($defaultStoreId == $storeAddressId)
152
            						<img src="/images/RadioButton_Selected.png" />
153
            						<input type="hidden" id="selectedPincode" value="$storeAddress.getPin()" />
154
        						#else
155
                    				<img id="selectStoreAddress_$storeAddressId" class="store-address-selector-button" src="/images/RadioButton_Unselected.png" title="Select this Store for Shipment" />
156
                    						<form id="formChangeStoreAddressTo_$storeAddressId" method="post" action="/shipping">
157
												<input type="hidden" name="selectedTab" value="HotSpot" />
158
												<input type="hidden" name="addressid" value="$storeAddressId" />
159
												<input type="hidden" name="action" value="change" />
160
        									</form>
161
                    			#end
162
                                        </td>
163
                    					<td class="detail">
164
                    						#if($storeAddress.getName())
165
                    							<b>$storeAddress.getName()</b><br />
166
                            				#end
167
                            				#if($storeAddress.getLine1())
168
                    							<label>$storeAddress.getLine1() </label><br />
169
                            				#end	
170
                            				#if($storeAddress.getLine2() != "")
171
                    							<label>$storeAddress.getLine2()</label><br />
172
                            				#end
173
                            				#if($storeAddress.getCity())	
174
                    							<label>$storeAddress.getCity()</label><br />
175
                            				#end
176
                            				#if($storeAddress.getState())
177
                    							<label>$storeAddress.getState()</label><br />
178
                            				#end
179
                            				#if($storeAddress.getPin())	
180
                    							<label>Pin: $storeAddress.getPin()</label>
181
                    						#end
182
                                            </p>
183
                            				#if($storeAddress.getPhone())
184
                                            <b>Phone: $storeAddress.getPhone() </b>
185
                            				#end
186
                                        </td>
187
                                    </tr>
188
                    		#end
189
                        </tbody>
190
                    </table>
191
    			</div><!--End of store address container-->
192
			</div>
193
			<div id="billing-address-div" class=$billing-and-store-div-status>
194
    			<div id="billing-address-header" class="address-header label left">
195
    				<div id="billing-address-header-text" class="address-header-text">Select Billing Address</div>
196
    				<button id="addAddress" class="right">+ Add New Address</button>
197
    			</div>
198
    			<div id="billing-address-container">
199
    				<table id="billing-addresses" class="shipping-page-addresses right">
200
            			<thead></thead>
201
            			<tbody>
202
            		#set($shipAddressEmpty = 1)
203
            		#foreach($address in $addresses)
204
            			#set($shipAddressEmpty = 0)
205
            			#set($addressId = $address.getId())
206
 
207
            			#if($defaultid == $addressId)
208
            				#set($cssClassDefault = "default-address")
209
            			#else
210
            				#set($cssClassDefault = "")
211
            			#end
212
            				<tr id="tr_$address.getId()" class="address $cssClassDefault">
213
            					<td align="center" valign="top" class="radio">
214
            			#if($defaultid == $addressId)
215
            				#set($shipAddressEmpty = 0)
216
							<img id="selectAddress_$addressId" class="dummy-class" src="/images/RadioButton_Selected.png" title="Select this Address for Shipment" />
217
            						<!--<input type="hidden" id="selectedPincode" value="$address.getPin()" />-->
218
            			#else
219
            					    <img id="selectAddress_$addressId" class="billing-address-selector-button" src="/images/RadioButton_Unselected.png" title="Select this Address for Shipment" />
220
            						<!--<form id="formChangeAddressTo_$addressId" method="post" action="/shipping?action=change&selectedTab=HotSpot&addressid=$addressId">
221
									</form>-->
222
            			#end
223
                                </td>
224
            					<td class="detail">
225
            						#if($address.getName())
226
            							<b>$address.getName()</b><br />
227
                    				#end
228
                    				#if($address.getLine1())
229
            							<label>$address.getLine1() </label><br />
230
                    				#end	
231
                    				#if($address.getLine2() != "")
232
            							<label>$address.getLine2()</label><br />
233
                    				#end
234
                    				#if($address.getCity())	
235
            							<label>$address.getCity()</label><br />
236
                    				#end
237
                    				#if($address.getState())
238
            							<label>$address.getState()</label><br />
239
                    				#end
240
                    				#if($address.getPin())	
241
            							<label>Pin: $address.getPin()</label>
242
            						#end
243
                                    </p>
244
                    				#if($address.getPhone())
245
                                    <b>Phone: $address.getPhone() </b>
246
                    				#end
247
                                </td>
248
            					<!--<td class="delete">
249
            						<img id="delete_$addressId" class="delete-address" src="/images/Cross_DeleteRow_DEF.png" title="Delete this Address"/>
250
								</td>-->
251
                            </tr>
252
            		#end
253
            		#if($shipAddressEmpty!=0)
254
                            <tr><td colspan="2">You do not have an address linked to your profile. Please add one.</td></tr>
255
            		#end
256
            			<input type="hidden" id="addressEmpty" value="$shipAddressEmpty">
257
                        </tbody>
258
                    </table>
259
    			</div>
260
			</div>
261
			<div id="shipping-address-div" class=$shipping-div-status>
262
    			<div id="shipping-address-header" class="address-header label left">
263
    				<div id="shipping-address-header-text" class="address-header-text">Select Shipping Address</div>
264
    				<button id="addAddress" class="right">+ Add New Address</button>
265
    			</div>
266
    			<div id="shipping-address-container">
267
    				<table id="shipping-addresses" class="shipping-page-addresses right">
268
            			<thead></thead>
269
            			<tbody>
270
            		#set($shipAddressEmpty = 1)
271
            		#foreach($address in $addresses)
272
            			#set($shipAddressEmpty = 0)
273
            			#set($addressId = $address.getId())
274
 
275
            			#if($defaultid == $addressId)
276
            				#set($cssClassDefault = "default-address")
277
            			#else
278
            				#set($cssClassDefault = "")
279
            			#end
280
            				<tr id="tr_$address.getId()" class="address $cssClassDefault">
281
            					<td align="center" valign="top" class="radio">
282
            			#if($defaultid == $addressId)
283
            				#set($shipAddressEmpty = 0)
284
            						<img src="/images/RadioButton_Selected.png" />
285
            						<input type="hidden" id="selectedPincode" value="$address.getPin()" />
286
            			#else
287
            					    <img id="selectAddress_$addressId" class="button-address-select" src="/images/RadioButton_Unselected.png" title="Select this Address for Shipment" />
288
            						<form id="formChangeAddressTo_$addressId" method="post" action="/shipping?action=change&selectedTab=myLocation&addressid=$addressId">
289
									</form>
290
            			#end
291
                                </td>
292
            					<td class="detail">
293
            						#if($address.getName())
294
            							<b>$address.getName()</b><br />
295
                    				#end
296
                    				#if($address.getLine1())
297
            							<label>$address.getLine1() </label><br />
298
                    				#end	
299
                    				#if($address.getLine2() != "")
300
            							<label>$address.getLine2()</label><br />
301
                    				#end
302
                    				#if($address.getCity())	
303
            							<label>$address.getCity()</label><br />
304
                    				#end
305
                    				#if($address.getState())
306
            							<label>$address.getState()</label><br />
307
                    				#end
308
                    				#if($address.getPin())	
309
            							<label>Pin: $address.getPin()</label>
310
            						#end
311
                                    </p>
312
                    				#if($address.getPhone())
313
                                    <b>Phone: $address.getPhone() </b>
314
                    				#end
315
                                </td>
316
                            </tr>
317
            		#end
318
            		#if($shipAddressEmpty!=0)
319
                            <tr><td colspan="2">You do not an shipping address linked to your profile. Please add one.</td></tr>
320
            		#end
321
            			<input type="hidden" id="addressEmpty" value="$shipAddressEmpty">
322
                        </tbody>
323
                    </table>
324
    			</div>
325
			</div>
861 vikas 326
 
3830 chandransh 327
		#if($shipAddressEmpty == 1)
328
			<input type="hidden" id="canProceedToPay" value="0" />
5831 anupam.sin 329
			<input type="hidden" id="reasonActionDisability" value="No address selected" />
3830 chandransh 330
		#elseif($locationServiceable == 0)
331
			<input type="hidden" id="canProceedToPay" value="0" />
332
			<input type="hidden" id="reasonActionDisability" value="Location not serviceable. Please specify a different address" />
3101 chandransh 333
		#else
3830 chandransh 334
			<input type="hidden" id="canProceedToPay" value="1" />
3101 chandransh 335
		#end
3830 chandransh 336
		<!-- Add Shipping Detail Start-->
337
        <form name="frmShippingAddress" id="frmShippingAddress" method="post" action="/shipping" class="right">
338
			<table cellpadding="0" cellspacing="0">
339
				<thead>
340
					<tr class="header">
5803 anupam.sin 341
						#if($selectedTab == "HotSpot")
342
							<td id="newAddressFormHeading" colspan="2">Enter the address which you want printed on the bill</td>
343
						#else
344
							<td id="newAddressFormHeading" colspan="2">Enter the address where you want the items to be delivered</td>
345
						#end
3830 chandransh 346
					</tr>
347
                </thead>
348
				<tbody>
349
					<tr>
350
						<td>&nbsp;</td>
351
						<td class="instruction">All Fields are required</td>
352
                    </tr>
353
                <tr>
4136 rajveer 354
					<td class="label" align="right"><sup>*</sup>Name:</td>
3830 chandransh 355
					<td class="input">
4453 varun.gupt 356
						<input type="text" id="shipName" name="name" class="searchbox right" />
3830 chandransh 357
					</td>
358
				</tr>
359
                <tr>
4136 rajveer 360
					<td class="label" align="right"><sup>*</sup>Address Line 1:</td>
3830 chandransh 361
					<td class="input">
362
						<input type="text" id="shipAddress1" name="line1" class="searchbox right" />
363
					</td>
364
				</tr>
365
                <tr>
366
					<td class="label" align="right">Address Line 2:</td>
367
					<td class="input">
368
						<input type="text" id="shipAddress2" name="line2" class="searchbox right" />
369
					</td>
370
				</tr>
371
                <tr>
4136 rajveer 372
					<td class="label" align="right"><sup>*</sup>State</td>
3830 chandransh 373
					<td class="input">
374
						<select class="select_state" name="state" id="shipState">
375
						#include("templates/stateslist.vm")
376
						</select>
377
					</td>
378
				</tr>
379
                <tr>
4136 rajveer 380
					<td class="label" align="right"><sup>*</sup>City:</td>
3830 chandransh 381
					<td class="input">
382
						<input type="text" id="shipCity" name="city" class="searchbox"/>
383
					</td>
384
				</tr>
385
                <tr>
4136 rajveer 386
					<td class="label" align="right"><sup>*</sup>Pin Code:</td>
3830 chandransh 387
					<td class="input">
388
						<input type="text" id="shipPin" name="pincode" value="" class="searchbox textbox-pincode" />
389
					</td>
390
				</tr>
391
                <tr>
4136 rajveer 392
					<td class="label" align="right"><sup>*</sup>Phone:</td>
3830 chandransh 393
					<td class="input">
3831 rajveer 394
						<input type="text" id="shipPhone" name="phone" value="" class="searchbox right" />
3830 chandransh 395
					</td>
396
				</tr>
397
                <tr>
398
					<td colspan="2" align="center">
399
						<input type="hidden" name="action" value="add" />
400
						<input type="submit"  id="submitAddress" value="Save Address" class="new-button" />
401
						<a id="closeAddAddressForm">Clear</a>
402
					</td>
403
				</tr>
404
				<tr>
405
					<td>&nbsp;</td>
5716 anupam.sin 406
					<td class="instruction">This will be added to your list of addresses</td>
3830 chandransh 407
				</tr>
408
                </tbody>
409
			</table>
5831 anupam.sin 410
			#if($selectedTab == "HotSpot")
411
				<input id="tabSelectorForAddAddressForm" type="hidden" name="selectedTab" value="HotSpot" />
412
			#else
413
				<input id="tabSelectorForAddAddressForm" type="hidden" name="selectedTab" value="myLocation" />
414
			#end
5716 anupam.sin 415
		</form>
416
	</div><!--End of main-right- Container-->