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