Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
517 rajveer 1
#set($Integer = 0)
2
#if($defaultAddressId)
3
	#set($defaultid = $Integer.parseInt($defaultAddressId))
4
#else
5
	#set($defaultid = 0)
6
#end
7
 
8
<!-- Add Shipping Detail Start-->
794 rajveer 9
<script type="text/javascript">
10
  $(document).ready(function(){
11
    $('#addAdrBtn').click(function(){
12
      $('#newShipAdr').show();			 
13
      scrollWin();
14
    });
15
    function scrollWin(){
16
      $('html, body').animate({
17
        scrollTop: $("#newShipAdr").offset().top
18
      }, 2000);
19
    }
20
 
21
  });
22
 
23
 
24
  function resetShipForm(){
25
    document.getElementById('shipName').value = '';
26
    document.getElementById('shipAddress1').value = '';
27
    document.getElementById('shipAddress2').value = '';
28
    document.getElementById('shipState').value = '0';
29
    document.getElementById('shipCity').value = '';
30
    document.getElementById('shipPin').value = '';
31
    document.getElementById('shipPhone').value = '';
32
 
33
  }
34
 
35
  function changeShipAddress(id){
36
    addressId = id.substring(20);
37
    /*
38
   alert("TODO AJAX request to change shipping address. " + addressId);
39
     jQuery.ajax({
40
        type: "POST",
41
        url: "./shipping",
42
        data: "action=change&addressid="+addressId,
43
        success: function(msg){
44
           alert( "Data Saved: " + msg );
45
              $("#addressid").val(msg);
46
        }
47
     });
48
     */
49
    $("#addressid").val(addressId);
50
    document.getElementById('shipAddressContainer').innerHTML = document.getElementById(id).innerHTML;
51
    //document.getElementById('newShipAdr').style.display = 'none';
52
    $('#newShipAdr').hide();
53
 
54
  }
55
 
56
</script>
57
 
58
<div id="registration">
59
  <div class="top">
60
    <div class="left">
61
      <div class="right"> &nbsp; </div>
507 rajveer 62
    </div>
794 rajveer 63
  </div>
64
  <div class="middle">
65
    <div class="mid-inner">
66
 
67
      <!-- Block 1 -->
68
      <div class="padding-top17">
839 vikas 69
				#if(!$errorMsg.isEmpty())
70
                <div id="messageError">
71
                    <span></span>
72
                    <p>
73
                        $errorMsg <br/>
74
                    </p>
75
                </div>
76
                    #end
77
 
794 rajveer 78
        <!-- Block-1 Right-->
517 rajveer 79
				#if($items)
805 rajveer 80
        <div class="shipping-block1-R" style="overflow-y:auto;">
794 rajveer 81
          <table cellpadding="0" cellspacing="0" width="100%" class="estimate-table" >
82
            <thead>
83
              <tr>
84
                <th width="36%">Item</th>
85
                <th width="29%">Delivery Estimate</th>
86
                <th width="10%" class="quantity">Qty.</th>
87
                <th width="25%" class="last">Total Price</th>
88
              </tr>
89
            </thead>
90
            <tbody>
507 rajveer 91
							#foreach($item in $items)
794 rajveer 92
              <tr>
93
                <td>$item.get("ITEM_NAME")</td>
94
                <td>within $item.get("SHIPPING_TIME") business days</td>
95
                <td class="quantity">$item.get("ITEM_QUANTITY")</td>
96
                <td>Rs. $item.get("TOTAL_PRICE")</td>
97
              </tr>
507 rajveer 98
							#end
794 rajveer 99
              <tr align="right">
100
                <td colspan="4" class="total-amount">Total Amount: Rs. $totalamount</td>
101
              </tr>
102
            </tbody>
103
          </table>
104
          <div align="right" class="proceed-bttn">
105
            <label class="floatLeft" style="margin-top: 3px;">We accept all major credit cards and debit cards &nbsp;</label>
106
            <div class="bigImgButton floatLeft yellow-image">
107
              <form action="./order" method="post">
108
                <input type="hidden" id="addressid" name="addressid" value="$defaultid" >
109
                <input type="submit" name="btnSearch"  id="" value="Proceed to Pay" class="button" />
110
              </form>
111
 
112
              <div class="clearBoth"></div>
113
            </div>
114
            <div class="clearBoth"></div>
115
          </div> 
116
        </div><!-- Block-1 Right End-->
517 rajveer 117
				#else
794 rajveer 118
        <div class="shipping-block1-R" style="height:225px; overflow-y:auto;">
119
          <label class="floatLeft" style="margin-top: 3px;">Your cart is empty. &nbsp;</label>
120
        </div>	
517 rajveer 121
				#end	
794 rajveer 122
        <!-- Block-1 Left-->
123
        <div class="shipping-block1-L">
839 vikas 124
          <div class="ship-address-block">
125
			<h2>Shipping Address</h2>
794 rajveer 126
            <div class="ship-address-inner" style="height:200px; overflow-y:auto;">
127
              <div id="shipAddressContainer">
517 rajveer 128
							#foreach($address in $addresses)
129
							#if($defaultid == $address.getId())
130
								#if($address.getName())
794 rajveer 131
                <label>$address.getName()</label><br />
517 rajveer 132
								#end
133
								#if($address.getLine1())
794 rajveer 134
                <label>$address.getLine1() </label><br />
517 rajveer 135
								#end	
136
								#if($address.getLine2())
794 rajveer 137
                <label>$address.getLine2()</label><br />
517 rajveer 138
								#end
139
								#if($address.getCity())	
794 rajveer 140
                <label>$address.getCity()</label><br />
517 rajveer 141
								#end
142
								#if($address.getState())
794 rajveer 143
                <label>$address.getState()</label><br />
517 rajveer 144
								#end
145
								#if($address.getPin())	
794 rajveer 146
                <label>Pin: $address.getPin()</label><br />
517 rajveer 147
								#end
148
								#if($address.getPhone())
794 rajveer 149
                <label>Mob: $address.getPhone() </label><br />
517 rajveer 150
								#end			
151
							#end
152
							#end
794 rajveer 153
              </div>
154
              <div class="ship-address-bttn" style="margin-top: 20px;">
155
                <div class="bigImgButton yellow-image">
637 rajveer 156
									#if($defaultid!=0)	
794 rajveer 157
                  <input type="button" name="addAdrBtn"  id="addAdrBtn" value="Ship to Another Address" class="button" />
637 rajveer 158
									#else
794 rajveer 159
                  <input type="button" name="addAdrBtn"  id="addAdrBtn" value="Add new Address" class="button" />
637 rajveer 160
									#end	
794 rajveer 161
                </div>
839 vikas 162
 
794 rajveer 163
              </div>
164
              <div class="clearBoth"></div>     
165
            </div>
517 rajveer 166
 
794 rajveer 167
          </div>
168
 
169
        </div><!-- Block-1 Left End-->
805 rajveer 170
		<div class="floatRight" style="font-size: 10px; margin-top: 10px; color: #999999;">By placing order, you agree to Saholic.com's Privacy Policy and Terms &amp; Conditions.</div>
171
 
794 rajveer 172
        <div class="clearBoth"></div>
173
      </div><!-- Block 1 End-->
174
      <div class="clearBoth"></div>
175
      <!-- Block 2 -->	
176
      <div class="padding-top17" style="display: none;" id="newShipAdr">
177
        <!-- Block 2 Right -->
811 rajveer 178
        <div class="shipping-block2-L">
794 rajveer 179
          <h2 class="mid-innerHeading">Other Addresses on Record</h2>
825 rajveer 180
          <div class="shipping-details-scroller">
794 rajveer 181
 
507 rajveer 182
					#foreach($address in $addresses)
825 rajveer 183
            <div class="ship-address-block-address">
794 rajveer 184
              <div class="ship-address-inner">
185
                <div id="shipAddressContainer$address.getId()">
517 rajveer 186
								#if($address.getName())
794 rajveer 187
                  <label>$address.getName()</label><br />
517 rajveer 188
								#end
189
								#if($address.getLine1())
794 rajveer 190
                  <label>$address.getLine1() </label><br />
517 rajveer 191
								#end	
192
								#if($address.getLine1())
794 rajveer 193
                  <label>$address.getLine2()</label><br />
517 rajveer 194
								#end
195
								#if($address.getCity())	
794 rajveer 196
                  <label>$address.getCity()</label><br />
517 rajveer 197
								#end
198
								#if($address.getState())
794 rajveer 199
                  <label>$address.getState()</label><br />
517 rajveer 200
								#end
201
								#if($address.getPin())	
794 rajveer 202
                  <label>Pin: $address.getPin()</label><br />
517 rajveer 203
								#end
204
								#if($address.getPhone())
794 rajveer 205
                  <label>Mob: $address.getPhone() </label><br />
517 rajveer 206
								#end			
794 rajveer 207
 
208
                </div>	
209
                <div class="ship-address-bttn">
210
                  <div class="bigImgButton yellow-image">
211
                    <input type="submit" name="btnSearch" onclick="changeShipAddress('shipAddressContainer$address.getId()')"  id="" value="Ship to this Address" class="button" />
212
                  </div>
213
                </div>
214
                <div class="clearBoth"></div>     
215
              </div>
216
            </div>
507 rajveer 217
					#end
794 rajveer 218
 
219
          </div>	
220
        </div>
221
 
222
 
223
 
224
        <div class="" style="width:424px; float:left;">
225
          <div class="ship-address-block">
226
            <h2>Specify a New Address</h2>
227
            <div class="ship-address-form">
839 vikas 228
              <form name="frmShippingAddress" id="frmShippingAddress" method="post" action="shipping"> <!-- action="./shipping" -->
794 rajveer 229
                <div class="register-row">
839 vikas 230
                  <label><sup>*</sup><span>Name:</span></label>
794 rajveer 231
                  <div class="imgTextBox textbox-image">
232
                    <input type="text" id="shipName" name="name" value="" class="textbox" />
233
                  </div>
234
                  <div class="clearBoth"></div>
507 rajveer 235
                </div>
794 rajveer 236
                <div class="register-row">
839 vikas 237
                  <label><sup>*</sup><span>Address:</span></label>
794 rajveer 238
                  <div class="imgTextBox textbox-image">
239
                    <input type="text" id="shipAddress1" name="line1" value="" class="textbox" />
240
                  </div>
241
                  <div class="clearBoth"></div>
242
                </div>
243
                <div class="register-row">
244
                  <label>&nbsp;</label>
245
                  <div class="imgTextBox textbox-image">
246
                    <input type="text" id="shipAddress2" name="line2" value="" class="textbox" />
247
                  </div>
248
                  <div class="clearBoth"></div>
249
                </div>
250
                <div class="register-row">
839 vikas 251
                  <label for="state"><sup>*</sup><span>State</span></label>
252
				  <div class="select-list imgTextBox">
253
                  <select class="select_state" name="state" id="shipState">
637 rajveer 254
										#include("templates/stateslist.vm")
794 rajveer 255
                  </select>
839 vikas 256
                  </div>
794 rajveer 257
                  <div class="clearBoth"></div>
258
                </div>
259
                <div class="register-row">
260
                  <label><sup>*</sup><span>City:</span></label>
261
                  <div class="imgTextBox textbox-image">
262
                    <input type="text" id="shipCity" name="city" value="" class="textbox"/>
263
                  </div>
264
                  <div class="clearBoth"></div>
265
                </div>
266
                <div class="register-row">
267
                  <label><sup>*</sup><span>Pin Code:</span></label>
268
                  <div class="imgTextBox textbox-image">
269
                    <input type="text" id="shipPin" name="pincode" value="" class="textbox textbox-pincode" style="width: 60px;" />
270
                  </div>
271
                  <div class="clearBoth"></div>
272
                </div>
273
                <div class="register-row">
274
                  <label><sup>*</sup><span>Phone:</span></label>
275
                  <div class="imgTextBox textbox-image">
276
                    <input type="text" id="shipPhone" name="phone" value="" class="textbox" />
277
                  </div>
278
                  <div class="clearBoth"></div>
279
                </div>
280
                <div class="ship-address-bttn">
811 rajveer 281
                  <div class="form-button-outer first">
282
                    <div class="bigImgButton floatLeft yellow-image">
283
                      <input type="hidden" id="" name="action" value="add" >
284
                      <input type="submit" name="submitAddress"  id="submitAddress" value="Ship to this Address" class="button" />
285
                    </div>
794 rajveer 286
                  </div>
811 rajveer 287
                  <div class="form-button-outer last">
288
                    <div class="bigImgButton floatLeft yellow-image">
289
                      <input type="button" name="btnSearch" onclick="resetShipForm();" id="" value="Cancel" class="button button1" />
290
                    </div>
794 rajveer 291
                  </div>
292
                  <div class="clearBoth"></div>
293
 
294
 
295
                </div>
296
                <div class="clearBoth"></div>
297
              </form>
298
            </div>
299
          </div>
300
        </div><!-- Block 2 Right End-->
301
 
302
        <div class="clearBoth"></div>
303
      </div><!-- Block 2 End-->	
304
      <div class="clearBoth"></div>
305
    </div><!-- mid inner end-->
306
  </div>
307
  <div class="bottom">
308
    <div class="left">
309
      <div class="right"> &nbsp; </div>
507 rajveer 310
    </div>
311
  </div>
794 rajveer 312
</div>
313
<!-- /Add Shipping Detail End-->