Subversion Repositories SmartDukaan

Rev

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