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