Subversion Repositories SmartDukaan

Rev

Rev 17843 | Rev 17900 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17843 Rev 17882
Line -... Line 1...
-
 
1
<script type="text/javascript" src="/js/checkout.js?v=<?php echo $staticversion;?>"></script>
1
<script>
2
<script>
2
	$(document).ready(function(){
3
	$(document).ready(function(){
3
			
4
			
4
		$("#state").val('<?php echo $getstateval;?>');
5
		$("#state").val('<?php echo $getstateval;?>');
5
 
6
 
Line 9... Line 10...
9
                $.ajax({
10
                $.ajax({
10
                    method: "GET",
11
                    method: "GET",
11
                    url:  "<?php echo $base_url;?>shippings/getstate/"+pin_val,
12
                    url:  "<?php echo $base_url;?>shippings/getstate/"+pin_val,
12
                },'json')
13
                },'json')
13
                .done(function(msg){ 
14
                .done(function(msg){ 
14
                	// alert(msg);
-
 
15
                	msg = eval('('+msg+')');
15
                	msg = eval('('+msg+')');
16
                	if(msg=="{}")                  
16
                	if(msg=="{}")                  
17
                	{
17
                	{
18
                		$("#cities").empty();
18
                		$("#cities").empty();
19
                		$("#state").val("");		
19
                		$("#state").val("");		
20
                	}
20
                	}
21
                	else
21
                	else
22
                	{
22
                	{
23
                		// msg = eval('('+msg+')');
-
 
24
                		$("#state").val(msg['state']);
23
                		$("#state").val(msg['state']);
25
                		$("#cities").empty();
24
                		$("#cities").empty();
26
                		for(var i in msg['cities']){
25
                		for(var i in msg['cities']){
27
                			var html = "<option value="+msg['cities'][i]+">"+msg['cities'][i]+"</option>"
26
                			var html = "<option value="+msg['cities'][i]+">"+msg['cities'][i]+"</option>"
28
                			$("#cities").append(html);
27
                			$("#cities").append(html);
Line 36... Line 35...
36
            	$("#state").val("");
35
            	$("#state").val("");
37
            }
36
            }
38
        });
37
        });
39
 
38
 
40
 
39
 
41
		$('#submitdata').click(function(){
-
 
42
			
-
 
43
			if($('#pin').val().length!=6)
-
 
44
			{
-
 
45
				$("#pin").next().html('Invalid Pin');
-
 
46
				$("#pin").css({"border":"red solid 1px"});
-
 
47
 
40
 
48
			}
-
 
49
			else
-
 
50
			{
-
 
51
				$("#pin").next().html('');
-
 
52
				$("#pin").css({"border":"#58d936 solid 1px"});
-
 
53
			}
-
 
54
 
41
	
55
			if($('#phone').val().length!=10)
-
 
56
			{
-
 
57
				$("#phone").next().html('Invalid Phone Number');
-
 
58
				$("#pin").css({"border":"red solid 1px"});
-
 
59
			}
-
 
60
			else
-
 
61
			{
-
 
62
				$("#phone").next().html('');
-
 
63
				$("#pin").css({"border":"#58d936 solid 1px"});
-
 
64
			}
-
 
65
 
42
 
66
 
43
 
67
		});
-
 
68
	});
44
	});
69
</script>
45
</script>
70
 
46
 
71
<style>
47
<style>
72
 
48
 
Line 177... Line 153...
177
  display: block;
153
  display: block;
178
  border: #fc1f1f dashed 1px;
154
  border: #fc1f1f dashed 1px;
179
  color: #fc1f1f;
155
  color: #fc1f1f;
180
  font: normal 1.4em/1.2em Helvetica, Arial, sans-serif;
156
  font: normal 1.4em/1.2em Helvetica, Arial, sans-serif;
181
  margin: 0 5px;
157
  margin: 0 5px;
182
  /*background: url(../images/error-notification.png) no-repeat 5px center;*/
-
 
183
  background-size: 20px;
158
  background-size: 20px;
184
  margin-bottom: 10px;
159
  margin-bottom: 10px;
185
}
160
}
186
 
161
 
187
.form_submit{
162
.form_submit{
Line 191... Line 166...
191
 
166
 
192
 
167
 
193
</style>
168
</style>
194
 
169
 
195
<div class='container' style='margin-bottom:50px;'>
170
<div class='container' style='margin-bottom:50px;'>
196
	<div class='row' style="padding-bottom:40px;">
171
	<div class='row' style="padding-bottom:55px;">
197
		<div class='col-xs-12' style='padding:0px'>
172
		<div class='col-xs-12' style='padding:0px'>
198
 
173
 
199
			<div class="shipping-cont">
174
			<div class="shipping-cont">
200
			<div id="error" class="error_msg" style="display:none">
175
			<div id="error" class="error_msg" style="display:none">
201
       		</div>
176
       		</div>
202
			<form method="post" action="<?php echo $base_url;?>shippings/add" name='form2' id='form2' class="address-form" 
177
			<form method="post" action="#" name='form2' id='form2' class="address-form" 
203
				<fieldset>
178
				<fieldset>
-
 
179
					<h4>Add New Address:
204
					<h4>Add New Address: <input type="submit" name="submit" value="Save" class='btn btn-success' id='form_submit' style='float:right;'/></h4>
180
					 <!-- <input type="submit"  name="submit" value="Save" class='btn btn-success' id='form_submit' style='float:right;'/> -->
-
 
181
					</h4>
205
 
182
 
206
					<!-- <label>Name<span>*</span></label> -->
183
					<!-- <label>Name<span>*</span></label> -->
207
					<input type="text" id="" name="name" placeholder="Enter name*" value="<?php echo $_COOKIE['name'];?>" required/>
184
					<input type="text" id="name" name="name" placeholder="Enter name*" value="<?php echo $user_name;?>" required/>
208
					<!-- <label>Address<span>*</span></label> -->
185
					<!-- <label>Address<span>*</span></label> -->
209
					<textarea rows="2" id="line1" name="line1" placeholder="Address*" required></textarea>
186
					<textarea rows="2" id="line1" name="line1" placeholder="Address*" required></textarea>
210
					<!-- <input type="text" id="line1" name="line1" required/> -->
187
					<!-- <input type="text" id="line1" name="line1" required/> -->
211
 
188
 
212
					<div class='row' style='padding-bottom:5px'> 
189
					<div class='row' style='padding-bottom:5px'> 
Line 215... Line 192...
215
							<datalist id="cities">
192
							<datalist id="cities">
216
							</datalist>
193
							</datalist>
217
							<input type="text" placeholder="City*" id="city" name="city" list="cities" required/>
194
							<input type="text" placeholder="City*" id="city" name="city" list="cities" required/>
218
 
195
 
219
							<!-- <label>Phone<span>*</span></label> -->
196
							<!-- <label>Phone<span>*</span></label> -->
220
							<input type="text" id="phone" placeholder="Contact number*" name="phone" pattern="\d.{9,9}" required title="Invalid Phone number.."/>
197
							<input type="text" id="phone" value="<?php echo $user_contact;?>" placeholder="Contact number*" name="phone" pattern="\d.{9,9}" required title="Invalid Phone number.."/>
221
						</div>
198
						</div>
222
						<div class='col-xs-6' style='padding:0px 0px 0px 5px ;'>
199
						<div class='col-xs-6' style='padding:0px 0px 0px 5px ;'>
223
							<!-- <label>State<span>*</span></label> -->
200
							<!-- <label>State<span>*</span></label> -->
224
							<select id="state" name="state" required>
201
							<select id="state" name="state" required>
225
								<option value="">Select State</option>
202
								<option value="">Select State</option>
Line 259... Line 236...
259
								<option value="Uttarakhand">Uttarakhand</option>
236
								<option value="Uttarakhand">Uttarakhand</option>
260
								<option value="West Bengal">West Bengal</option>
237
								<option value="West Bengal">West Bengal</option>
261
							</select>
238
							</select>
262
 
239
 
263
							<!-- <label>Pincode<span>*</span></label> -->
240
							<!-- <label>Pincode<span>*</span></label> -->
264
							<input placeholder="Pincode*" required value='<?php echo $_COOKIE['pin'];?>' type="text" id="pin" name="pin" pattern="\d.{5,5}" title="Invalid Pin" />
241
							<input placeholder="Pincode*" required value='<?php echo $pinval;?>' type="text" id="pin" name="pin" pattern="\d.{5,5}" title="Invalid Pin" />
265
						</div>
242
						</div>
266
					</div>
243
					</div>
267
				</fieldset>
244
				</fieldset>
268
			</form>
245
			</form>
269
 
246
 
270
 
247
 
271
		</div>
248
		</div>
272
	</div>
249
	</div>
273
 
250
 
274
 
251
 
275
		<div class='row' style='padding:0px;' id='footer'>
252
	<div class='row' style='padding:0px;' id='footer'>
276
			<!-- <div class='col-xs-12' style='background-color:white;padding:5px; width:100%;'> --><div class="col-xs-12 navbar-fixed-bottom pmfooter">
253
		<div class='col-xs-12' style='background-color:white;padding:5px; width:100%;'>
277
				<h4>Total payable Amount: Rs. 1000000/-<br>
254
			<h4>Total payable Amount: &#8377; <?php echo number_format($totalPayable);?></h4>
278
					<a href="#" style='	padding-right:2px;color:blue;font-size:15px;'>Other Pay Option</a>
255
			<a href="#" style='padding-right:2px;color:blue;font-size:15px;' data-name="other_option" class="submit_check"><u>Other Pay Option</u></a>
279
					<!-- <button class='btn btn-success' style='float:right;'>Confirm Order via COD</button> -->
-
 
280
					<button type="button" class="btn btn-md pull-right checkout">Confirm Order via COD</button>
256
			<button class="btn btn-success pull-right submit_check" data-name="cod">Confirm Order via COD</button>
281
					
-
 
282
				</div>
257
		</div>
283
			</div>
258
	</div>
284
</div>
259
</div>
285
260