Subversion Repositories SmartDukaan

Rev

Rev 17947 | Rev 17967 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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