| 17794 |
naman |
1 |
<script>
|
|
|
2 |
$(document).ready(function(){
|
|
|
3 |
$('.radGroup2').click(function(){
|
|
|
4 |
var pin = $(this).data('pin');
|
|
|
5 |
var add_id = $(this).data('id');
|
|
|
6 |
$('#loadingModal').modal('show');
|
|
|
7 |
$.ajax({
|
|
|
8 |
method: "GET",
|
|
|
9 |
url: "<?php echo $base_url;?>shippings/isServicable/"+pin,
|
|
|
10 |
})
|
|
|
11 |
.done(function( msg ) {
|
|
|
12 |
$('#loadingModal').modal('hide');
|
|
|
13 |
if(msg== 'true'){
|
|
|
14 |
$('.myaddress').removeClass('addressselect');
|
|
|
15 |
$('#address'+add_id).addClass('addressselect');
|
|
|
16 |
// $('#message_success').empty();
|
|
|
17 |
// $('#message_success').append();
|
|
|
18 |
// $('#message_success').removeClass('hidden');
|
|
|
19 |
|
|
|
20 |
// setTimeout(function() {
|
|
|
21 |
// $('#message_success ').addClass('hidden');
|
|
|
22 |
// }, 2000);
|
|
|
23 |
}
|
|
|
24 |
if(msg== 'false'){
|
|
|
25 |
$('#message').empty();
|
|
|
26 |
$('#message').append("Location is not serviceable...");
|
|
|
27 |
$('#message').removeClass('hidden');
|
|
|
28 |
$("input:radio").removeAttr("checked");
|
|
|
29 |
$('.myaddress').removeClass('addressselect');
|
|
|
30 |
setTimeout(function() {
|
|
|
31 |
$('#message').addClass('hidden');
|
|
|
32 |
}, 2000);
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
// alert(msg);
|
|
|
36 |
});
|
|
|
37 |
});
|
|
|
38 |
|
|
|
39 |
$("#showmore").click(function(){
|
|
|
40 |
$("#showmoreaddressdropdown").toggle();
|
|
|
41 |
if($('#showmore').html() == 'Show More')
|
|
|
42 |
{
|
|
|
43 |
$("#showmore").html('Show Less');
|
|
|
44 |
}
|
|
|
45 |
else if($("#showmore").html() == 'Show Less')
|
|
|
46 |
{
|
|
|
47 |
// $("#showmore").empty();
|
|
|
48 |
$("#showmore").html('Show More');
|
|
|
49 |
}
|
|
|
50 |
});
|
|
|
51 |
});
|
|
|
52 |
</script>
|
|
|
53 |
|
|
|
54 |
<style>
|
|
|
55 |
#footer{
|
|
|
56 |
position:fixed;
|
|
|
57 |
/*height:50px;*/
|
|
|
58 |
/*background-color:red;*/
|
|
|
59 |
bottom:0px;
|
|
|
60 |
left:0px;
|
|
|
61 |
right:0px;
|
|
|
62 |
margin-bottom:0px;
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
#message,#message_success{
|
|
|
66 |
position:fixed;
|
|
|
67 |
/*height:50px;*/
|
|
|
68 |
/*background-color:red;*/
|
|
|
69 |
/*background-color: white;*/
|
|
|
70 |
top:0px;
|
|
|
71 |
left:0px;
|
|
|
72 |
right:0px;
|
|
|
73 |
margin-top:0px;
|
|
|
74 |
z-index: 10;
|
|
|
75 |
}
|
|
|
76 |
|
|
|
77 |
.addressselect{
|
|
|
78 |
background-color: #D9FACF;
|
|
|
79 |
}
|
|
|
80 |
input[type=radio].css-checkbox {
|
|
|
81 |
position:absolute; z-index:-1000; left:-1000px; overflow: hidden; clip: rect(0 0 0 0); height:1px; width:1px; margin:-1px; padding:0; border:0;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
input[type=radio].css-checkbox + label.css-label {
|
|
|
85 |
padding-left:21px;
|
|
|
86 |
height:16px;
|
|
|
87 |
display:inline-block;
|
|
|
88 |
line-height:16px;
|
|
|
89 |
background-repeat:no-repeat;
|
|
|
90 |
background-position: 0 0;
|
|
|
91 |
/*font-size:16px;*/
|
|
|
92 |
vertical-align:middle;
|
|
|
93 |
cursor:pointer;
|
|
|
94 |
|
|
|
95 |
}
|
|
|
96 |
|
|
|
97 |
input[type=radio].css-checkbox:checked + label.css-label {
|
|
|
98 |
background-position: 0 -16px;
|
|
|
99 |
}
|
|
|
100 |
label.css-label {
|
|
|
101 |
background-image:url(../img/radio.png);
|
|
|
102 |
-webkit-touch-callout: none;
|
|
|
103 |
-webkit-user-select: none;
|
|
|
104 |
-khtml-user-select: none;
|
|
|
105 |
-moz-user-select: none;
|
|
|
106 |
-ms-user-select: none;
|
|
|
107 |
user-select: none;
|
|
|
108 |
}
|
|
|
109 |
/*background: url(../img/radio.png) 0 -16px repeat-x;*/
|
|
|
110 |
/*label {
|
|
|
111 |
display: inline-block;
|
|
|
112 |
cursor: pointer;
|
|
|
113 |
position: relative;
|
|
|
114 |
padding-left: 25px;
|
|
|
115 |
margin-right: 15px;
|
|
|
116 |
font-size: 13px;
|
|
|
117 |
}
|
|
|
118 |
input[type=radio] {
|
|
|
119 |
display: none;
|
|
|
120 |
}
|
|
|
121 |
label:before {
|
|
|
122 |
content: "";
|
|
|
123 |
display: inline-block;
|
|
|
124 |
|
|
|
125 |
width: 16px;
|
|
|
126 |
height: 16px;
|
|
|
127 |
|
|
|
128 |
margin-right: 10px;
|
|
|
129 |
position: absolute;
|
|
|
130 |
left: 0;
|
|
|
131 |
bottom: 1px;
|
|
|
132 |
background-color: #aaa;
|
|
|
133 |
box-shadow: inset 0px 2px 3px 0px rgba(0, 0, 0, .3), 0px 1px 0px 0px rgba(255, 255, 255, .8);
|
|
|
134 |
}
|
|
|
135 |
.radio label:before {
|
|
|
136 |
border-radius: 8px;
|
|
|
137 |
}
|
|
|
138 |
input[type=radio]:checked + label:before {
|
|
|
139 |
content: "\2022";
|
|
|
140 |
color: #f3f3f3;
|
|
|
141 |
font-size: 30px;
|
|
|
142 |
text-align: center;
|
|
|
143 |
line-height: 18px;
|
|
|
144 |
}*/
|
|
|
145 |
</style>
|
|
|
146 |
<?php debug($firstshowaddress);?>
|
|
|
147 |
|
|
|
148 |
<div class="alert alert-danger hidden" id="message"></div>
|
|
|
149 |
<div class="alert alert-success hidden" id="message_success"></div>
|
|
|
150 |
<div class='container' style='margin-bottom:50px;'>
|
|
|
151 |
|
|
|
152 |
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
<div class='row' style="padding-bottom:40px;">
|
|
|
156 |
|
|
|
157 |
|
|
|
158 |
<div class= 'row'>
|
|
|
159 |
<div class='col-xs-12' style="background-color:white;margin-top:5px;">
|
|
|
160 |
<h4>Shipping Address: <a href= "<?php echo $base_url;?>shippings/add" class='btn btn-success btn-xs' style='float:right;'>Add New Address</a></h4>
|
|
|
161 |
<br>
|
|
|
162 |
|
|
|
163 |
</div>
|
|
|
164 |
</div>
|
|
|
165 |
<div class='col-xs-12' style='background-color:white;padding:40px;padding:3px 20px;'>
|
|
|
166 |
<div style='background-color:#f8f8f8;padding:5px;'>
|
|
|
167 |
<?php
|
|
|
168 |
for($i=0;$i<count($firstshowaddress);$i++){?>
|
|
|
169 |
|
|
|
170 |
<?php if($i==3):?>
|
|
|
171 |
<div id='showmoreaddressdropdown' style='display:none;'>
|
|
|
172 |
<?php endif;?>
|
|
|
173 |
<?php //if(count($firstshowaddress)>$i):?>
|
|
|
174 |
<div style = 'height:60px;padding:4px;' id = "address<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>" class='myaddress <?php if(intval($address['defaultAddress']) == $address['addresses'][$firstshowaddress[$i]]['id']){echo "addressselect";}?>'>
|
|
|
175 |
|
|
|
176 |
<input type="radio" class="css-checkbox" id='<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>' name="selectedaddress" <?php if(intval($address['defaultAddress']) == $address['addresses'][$firstshowaddress[$i]]['id']){echo "checked";}?>>
|
|
|
177 |
|
|
|
178 |
<label for="<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>" class="css-label radGroup2" data-pin="<?php echo $address['addresses'][$firstshowaddress[$i]]['pin'];?>" data-id="<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>">
|
|
|
179 |
<?php
|
|
|
180 |
if(isset($address['addresses'][$firstshowaddress[$i]]['line1']) && !empty($address['addresses'][$firstshowaddress[$i]]['line1']))
|
|
|
181 |
{echo "Address: ",$address['addresses'][$firstshowaddress[$i]]['line1'];}
|
|
|
182 |
if(isset($address['addresses'][$firstshowaddress[$i]]['line2']) && !empty($address['addresses'][$firstshowaddress[$i]]['line2']))
|
|
|
183 |
{echo ",",$address['addresses'][$firstshowaddress[$i]]['line2'];}
|
|
|
184 |
if(isset($address['addresses'][$firstshowaddress[$i]]['city']) && !empty($address['addresses'][$firstshowaddress[$i]]['city']))
|
|
|
185 |
{echo "<br>",$address['addresses'][$firstshowaddress[$i]]['city'];}
|
|
|
186 |
if(isset($address['addresses'][$firstshowaddress[$i]]['state']) && !empty($address['addresses'][$firstshowaddress[$i]]['state']))
|
|
|
187 |
{echo ", ",$address['addresses'][$firstshowaddress[$i]]['state'];}
|
|
|
188 |
if(isset($address['addresses'][$firstshowaddress[$i]]['pin']) && !empty($address['addresses'][$firstshowaddress[$i]]['pin']))
|
|
|
189 |
{echo ",",$address['addresses'][$firstshowaddress[$i]]['pin'];}
|
|
|
190 |
?>
|
|
|
191 |
</label>
|
|
|
192 |
|
|
|
193 |
</div><hr style='margin:0px;padding:0px;border-color:#58d936;'>
|
|
|
194 |
<?php //endif;?>
|
|
|
195 |
|
|
|
196 |
<?php if($i>3 && $i==(count($firstshowaddress)-1)):?>
|
|
|
197 |
</div>
|
|
|
198 |
<!-- <center><button class='btn btn-default btn-xs' id='showmore'>Show More</button></center> -->
|
|
|
199 |
<?php endif;?>
|
|
|
200 |
|
|
|
201 |
<?php }?>
|
|
|
202 |
</div>
|
|
|
203 |
</div>
|
|
|
204 |
<?php if(count($firstshowaddress)>3):?>
|
|
|
205 |
<center><div class='btn btn-default btn-xs' id='showmore'>Show More</div></center>
|
|
|
206 |
<?php endif;?>
|
|
|
207 |
</div>
|
|
|
208 |
<!-- End of address section -->
|
|
|
209 |
|
|
|
210 |
<!-- Cart section started -->
|
|
|
211 |
<div class='row' style='padding:0px;' id='footer'>
|
|
|
212 |
<div class='col-xs-12' style='background-color:white;padding:5px; width:100%;'>
|
|
|
213 |
<h4>Total payable Amount: Rs. 1000000/-<br>
|
|
|
214 |
<button class='btn btn-success'>Confirm Order via COD</button>
|
|
|
215 |
<a href="#" style='float:right;padding-right:2px;color:blue;font-size:15px;'>Other Pay Option</a>
|
|
|
216 |
</div>
|
|
|
217 |
</div>
|
|
|
218 |
|
|
|
219 |
<!-- Cart section end -->
|
|
|
220 |
</div>
|
|
|
221 |
|