| 17840 |
manish.sha |
1 |
<script type="text/javascript" src="/js/checkout.js?v=<?php echo $staticversion;?>"></script>
|
| 17959 |
manish.sha |
2 |
<script type="text/javascript">
|
|
|
3 |
$(document).ready(function(){
|
|
|
4 |
var cart_details = localStorage.getItem("cart_details");
|
|
|
5 |
if(cart_details == undefined){
|
|
|
6 |
$('span#totalPayable').text(' ₹ 0');
|
|
|
7 |
$('button.confirmcheckout').prop( "disabled", true );
|
| 17967 |
manish.sha |
8 |
$('.confirmprepaid').addClass('confirmprepaidDisabled').removeClass('confirmprepaid');
|
| 18633 |
manish.sha |
9 |
$('button.confirmcredit').prop( "disabled", true );
|
| 17959 |
manish.sha |
10 |
}else{
|
|
|
11 |
$('button.confirmcheckout').prop( "disabled", false );
|
| 17967 |
manish.sha |
12 |
$('.confirmprepaidDisabled').addClass('confirmprepaid').removeClass('confirmprepaidDisabled');
|
| 18633 |
manish.sha |
13 |
$('button.confirmcredit').prop( "disabled", false );
|
| 17959 |
manish.sha |
14 |
}
|
|
|
15 |
});
|
|
|
16 |
</script>
|
| 17794 |
naman |
17 |
<style>
|
| 17840 |
manish.sha |
18 |
#footer {
|
|
|
19 |
position: fixed;
|
|
|
20 |
/*height:50px;*/
|
|
|
21 |
/*background-color:red;*/
|
|
|
22 |
bottom: 0px;
|
|
|
23 |
left: 0px;
|
|
|
24 |
right: 0px;
|
|
|
25 |
margin-bottom: 0px;
|
| 17794 |
naman |
26 |
}
|
|
|
27 |
|
| 17840 |
manish.sha |
28 |
#message,#message_success {
|
|
|
29 |
position: fixed;
|
|
|
30 |
/*height:50px;*/
|
|
|
31 |
/*background-color:red;*/
|
|
|
32 |
/*background-color: white;*/
|
|
|
33 |
top: 0px;
|
|
|
34 |
left: 0px;
|
|
|
35 |
right: 0px;
|
|
|
36 |
margin-top: 0px;
|
|
|
37 |
z-index: 10;
|
| 17794 |
naman |
38 |
}
|
|
|
39 |
|
| 17840 |
manish.sha |
40 |
.addressselect {
|
|
|
41 |
background-color: #D9FACF;
|
| 17794 |
naman |
42 |
}
|
| 17840 |
manish.sha |
43 |
|
| 17794 |
naman |
44 |
input[type=radio].css-checkbox {
|
| 17840 |
manish.sha |
45 |
position: absolute;
|
|
|
46 |
z-index: -1000;
|
|
|
47 |
left: -1000px;
|
|
|
48 |
overflow: hidden;
|
|
|
49 |
clip: rect(0, 0, 0, 0);
|
|
|
50 |
height: 1px;
|
|
|
51 |
width: 1px;
|
|
|
52 |
margin: -1px;
|
|
|
53 |
padding: 0;
|
|
|
54 |
border: 0;
|
|
|
55 |
}
|
| 17794 |
naman |
56 |
|
| 17840 |
manish.sha |
57 |
input[type=radio].css-checkbox+label.css-label {
|
|
|
58 |
padding-left: 21px;
|
|
|
59 |
padding-bottom:10px;
|
|
|
60 |
height: 16px;
|
|
|
61 |
display: inline-block;
|
|
|
62 |
line-height: 16px;
|
|
|
63 |
background-repeat: no-repeat;
|
|
|
64 |
background-position: 0 0;
|
|
|
65 |
/*font-size:16px;*/
|
|
|
66 |
vertical-align: middle;
|
|
|
67 |
cursor: pointer;
|
|
|
68 |
}
|
| 17794 |
naman |
69 |
|
| 17840 |
manish.sha |
70 |
input[type=radio].css-checkbox:checked+label.css-label {
|
|
|
71 |
background-position: 0 -16px;
|
|
|
72 |
}
|
| 17794 |
naman |
73 |
|
| 17840 |
manish.sha |
74 |
label.css-label {
|
|
|
75 |
background-image: url(../img/radio.png);
|
|
|
76 |
-webkit-touch-callout: none;
|
|
|
77 |
-webkit-user-select: none;
|
|
|
78 |
-khtml-user-select: none;
|
|
|
79 |
-moz-user-select: none;
|
|
|
80 |
-ms-user-select: none;
|
|
|
81 |
user-select: none;
|
| 17794 |
naman |
82 |
}
|
| 17882 |
naman |
83 |
|
|
|
84 |
|
|
|
85 |
.custom_class
|
|
|
86 |
{color: red;}
|
| 17794 |
naman |
87 |
</style>
|
| 17882 |
naman |
88 |
<?php
|
|
|
89 |
if($message != null){?>
|
|
|
90 |
<script>
|
|
|
91 |
$(document).ready(function(){
|
|
|
92 |
$('#message').empty();
|
|
|
93 |
$('#message').append("Location is not serviceable...");
|
|
|
94 |
$('#message').removeClass('hidden');
|
|
|
95 |
|
|
|
96 |
setTimeout(function() {
|
|
|
97 |
$('#message').addClass('hidden');
|
|
|
98 |
}, 2000);
|
|
|
99 |
});
|
|
|
100 |
</script>
|
|
|
101 |
<?php }?>
|
|
|
102 |
<div class="modal fade" id="loadingModal">
|
|
|
103 |
<div class="modal-dialog">
|
|
|
104 |
<div class="modal-content">
|
|
|
105 |
<div class="modal-body">
|
|
|
106 |
<div class="text-center">
|
|
|
107 |
<img src="/img/ajax-loader.gif"/>
|
|
|
108 |
</div>
|
|
|
109 |
</div>
|
|
|
110 |
</div><!-- /.modal-content -->
|
|
|
111 |
</div><!-- /.modal-dialog -->
|
|
|
112 |
</div>
|
| 17794 |
naman |
113 |
<div class="alert alert-danger hidden" id="message"></div>
|
|
|
114 |
<div class="alert alert-success hidden" id="message_success"></div>
|
|
|
115 |
<div class='container' style='margin-bottom:50px;'>
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
| 17882 |
naman |
120 |
<div class='row' style="padding-bottom:55px;">
|
| 17794 |
naman |
121 |
|
|
|
122 |
|
|
|
123 |
<div class= 'row'>
|
|
|
124 |
<div class='col-xs-12' style="background-color:white;margin-top:5px;">
|
| 18633 |
manish.sha |
125 |
<?php if($addressEditable):?>
|
|
|
126 |
<h4>Shipping Address: <a href= "<?php echo $base_url;?>shippings/add/<?php echo $user_name.'/'.$user_contact;?>" class='btn btn-success btn-xs' style='float:right;'>Add New Address</a></h4>
|
| 18529 |
manish.sha |
127 |
<?php else:?>
|
| 18633 |
manish.sha |
128 |
<h4>Shipping & Billing Address: </h4> <span style='padding-right:2px;color:red;font-size:10px;float:right;'>For Any Change in Shipping Address. Please Contact Customer Care</span>
|
| 18529 |
manish.sha |
129 |
<?php endif;?>
|
| 17794 |
naman |
130 |
<br>
|
|
|
131 |
|
|
|
132 |
</div>
|
|
|
133 |
</div>
|
|
|
134 |
<div class='col-xs-12' style='background-color:white;padding:40px;padding:3px 20px;'>
|
| 17882 |
naman |
135 |
|
| 17794 |
naman |
136 |
<div style='background-color:#f8f8f8;padding:5px;'>
|
|
|
137 |
<?php
|
|
|
138 |
for($i=0;$i<count($firstshowaddress);$i++){?>
|
|
|
139 |
|
|
|
140 |
<?php if($i==3):?>
|
|
|
141 |
<div id='showmoreaddressdropdown' style='display:none;'>
|
|
|
142 |
<?php endif;?>
|
|
|
143 |
<?php //if(count($firstshowaddress)>$i):?>
|
| 17888 |
manish.sha |
144 |
<div style = 'min-height:80px;padding:4px;' id = "address<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>" class='myaddress <?php if($defaultselectedaddress == $address['addresses'][$firstshowaddress[$i]]['id']){echo "addressselect";}?>'>
|
| 17882 |
naman |
145 |
|
| 17883 |
amit.gupta |
146 |
<input type="radio" class="css-checkbox" id='<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>' value='<?php echo $address['addresses'][$firstshowaddress[$i]]['id'];?>' name="selectedaddress" <?php if($defaultselectedaddress == $address['addresses'][$firstshowaddress[$i]]['id']){echo "checked";}?>>
|
| 17882 |
naman |
147 |
|
|
|
148 |
<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'];?>">
|
| 17794 |
naman |
149 |
<?php
|
| 17882 |
naman |
150 |
if(isset($address['addresses'][$firstshowaddress[$i]]['line1']) && !empty($address['addresses'][$firstshowaddress[$i]]['line1']))
|
|
|
151 |
{echo "Address: ",$address['addresses'][$firstshowaddress[$i]]['line1'];}
|
|
|
152 |
if(isset($address['addresses'][$firstshowaddress[$i]]['line2']) && !empty($address['addresses'][$firstshowaddress[$i]]['line2']))
|
|
|
153 |
{echo ",",$address['addresses'][$firstshowaddress[$i]]['line2'];}
|
|
|
154 |
if(isset($address['addresses'][$firstshowaddress[$i]]['city']) && !empty($address['addresses'][$firstshowaddress[$i]]['city']))
|
|
|
155 |
{echo "<br>",$address['addresses'][$firstshowaddress[$i]]['city'];}
|
|
|
156 |
if(isset($address['addresses'][$firstshowaddress[$i]]['state']) && !empty($address['addresses'][$firstshowaddress[$i]]['state']))
|
|
|
157 |
{echo ", ",$address['addresses'][$firstshowaddress[$i]]['state'];}
|
|
|
158 |
if(isset($address['addresses'][$firstshowaddress[$i]]['pin']) && !empty($address['addresses'][$firstshowaddress[$i]]['pin']))
|
|
|
159 |
{echo ",",$address['addresses'][$firstshowaddress[$i]]['pin'];}
|
| 17794 |
naman |
160 |
?>
|
|
|
161 |
</label>
|
|
|
162 |
|
|
|
163 |
</div><hr style='margin:0px;padding:0px;border-color:#58d936;'>
|
|
|
164 |
<?php //endif;?>
|
|
|
165 |
|
|
|
166 |
<?php if($i>3 && $i==(count($firstshowaddress)-1)):?>
|
|
|
167 |
</div>
|
|
|
168 |
<!-- <center><button class='btn btn-default btn-xs' id='showmore'>Show More</button></center> -->
|
|
|
169 |
<?php endif;?>
|
|
|
170 |
|
|
|
171 |
<?php }?>
|
|
|
172 |
</div>
|
|
|
173 |
</div>
|
|
|
174 |
<?php if(count($firstshowaddress)>3):?>
|
|
|
175 |
<center><div class='btn btn-default btn-xs' id='showmore'>Show More</div></center>
|
|
|
176 |
<?php endif;?>
|
|
|
177 |
</div>
|
|
|
178 |
<!-- End of address section -->
|
|
|
179 |
|
|
|
180 |
<!-- Cart section started -->
|
|
|
181 |
<div class='row' style='padding:0px;' id='footer'>
|
| 18438 |
manish.sha |
182 |
<div class='col-xs-12' style='background-color:white;padding: 10px 20px 20px 20px; width:100%;'>
|
|
|
183 |
<h4 style="margin: 0px;margin-bottom: 8px;">Total payable Amount: <span style="color:#ff0000;" id="totalPayable"> ₹ <?php echo number_format($totalPayable);?></span></h4>
|
| 18678 |
manish.sha |
184 |
<?php if($creditorAssociated && $creditLimit >0):?>
|
| 18633 |
manish.sha |
185 |
<h6>Confirm Order: Choose Option</h6>
|
|
|
186 |
<?php if($codAvailable):?>
|
| 18678 |
manish.sha |
187 |
<div class="col-xs-12" style="margin-left: 20px; ">
|
|
|
188 |
<div class="col-xs-4"><button type="button" class="btn btn-md confirmprepaid" style="margin:10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">Other</button></div>
|
|
|
189 |
<div class="col-xs-4"><button type="button" class="btn btn-md confirmcheckout" style="margin:10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">COD</button></div>
|
|
|
190 |
<div class="col-xs-4"><button type="button" class="btn btn-md confirmcredit" style="margin:10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">Credit</button></div>
|
| 18633 |
manish.sha |
191 |
</div>
|
|
|
192 |
<?php else:?>
|
| 18678 |
manish.sha |
193 |
<div class="col-xs-12" style="margin-left: 20px; ">
|
|
|
194 |
<div class="col-xs-4"><span style='padding-right:2px;color:red;font-size:12px;"margin:0px 10px 0px 0px;'>*COD Not Available</span></div>
|
|
|
195 |
<div class="col-xs-4"><button type="button" class="btn btn-md confirmprepaid" style="margin:10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">Other</button></div>
|
|
|
196 |
<div class="col-xs-4"><button type="button" class="btn btn-md confirmcredit" style="margin:10px 20px 0px 0px; background-color: #5cb85c; color: #fff;">Credit</button></div>
|
| 18633 |
manish.sha |
197 |
</div>
|
|
|
198 |
<?php endif;?>
|
| 17947 |
manish.sha |
199 |
<?php else:?>
|
| 18633 |
manish.sha |
200 |
<?php if($codAvailable):?>
|
|
|
201 |
<a href="#" style='padding-right:2px;color:blue;font-size:15px;' class="confirmprepaid"><u>Other Pay Option</u></a>
|
|
|
202 |
<button class="btn btn-success confirmcheckout pull-right" >Confirm Order via COD</button>
|
|
|
203 |
<?php else:?>
|
|
|
204 |
<span style='padding-right:2px;color:red;font-size:15px;'>*COD Not Available</span>
|
|
|
205 |
<button class="btn btn-success confirmprepaid pull-right" >Other Pay Option</button>
|
|
|
206 |
<?php endif;?>
|
| 17947 |
manish.sha |
207 |
<?php endif;?>
|
| 18633 |
manish.sha |
208 |
|
| 17794 |
naman |
209 |
</div>
|
|
|
210 |
</div>
|
|
|
211 |
|
|
|
212 |
<!-- Cart section end -->
|
|
|
213 |
</div>
|
|
|
214 |
|