Subversion Repositories SmartDukaan

Rev

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

Rev 17794 Rev 17840
Line 1... Line -...
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,
1
<script type="text/javascript" src="/js/checkout.js?v=<?php echo $staticversion;?>"></script>
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
 
2
 
54
<style>
3
<style>
55
#footer{
4
#footer {
56
    position:fixed;
5
	position: fixed;
57
    /*height:50px;*/
6
	/*height:50px;*/
58
    /*background-color:red;*/
7
	/*background-color:red;*/
59
    bottom:0px;
8
	bottom: 0px;
60
    left:0px;
9
	left: 0px;
61
    right:0px;
10
	right: 0px;
62
    margin-bottom:0px;
11
	margin-bottom: 0px;
63
}
12
}
64
 
13
 
65
#message,#message_success{
14
#message,#message_success {
66
    position:fixed;
15
	position: fixed;
67
    /*height:50px;*/
16
	/*height:50px;*/
68
    /*background-color:red;*/
17
	/*background-color:red;*/
69
    /*background-color: white;*/
18
	/*background-color: white;*/
70
    top:0px;
19
	top: 0px;
71
    left:0px;
20
	left: 0px;
72
    right:0px;
21
	right: 0px;
73
    margin-top:0px; 
22
	margin-top: 0px;
74
    z-index: 10;  
23
	z-index: 10;
75
}
24
}
76
 
25
 
77
.addressselect{
26
.addressselect {
78
    background-color: #D9FACF;
27
	background-color: #D9FACF;
79
}
28
}
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
 
29
 
84
						input[type=radio].css-checkbox + label.css-label {
30
input[type=radio].css-checkbox {
85
							padding-left:21px;
31
	position: absolute;
86
							height:16px; 
32
	z-index: -1000;
87
							display:inline-block;
33
	left: -1000px;
88
							line-height:16px;
34
	overflow: hidden;
89
							background-repeat:no-repeat;
35
	clip: rect(0, 0, 0, 0);
90
							background-position: 0 0;
36
	height: 1px;
91
							/*font-size:16px;*/
37
	width: 1px;
92
							vertical-align:middle;
38
	margin: -1px;
-
 
39
	padding: 0;
93
							cursor:pointer;
40
	border: 0;
94
 
41
}
95
						}
-
 
96
 
42
 
97
						input[type=radio].css-checkbox:checked + label.css-label {
43
input[type=radio].css-checkbox+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;
44
	padding-left: 21px;
106
				-ms-user-select: none;
45
	padding-bottom:10px;
107
				user-select: none;
46
	height: 16px;
108
			}
-
 
109
/*background: url(../img/radio.png) 0 -16px repeat-x;*/
-
 
110
/*label {
-
 
111
    display: inline-block;
47
	display: inline-block;
112
    cursor: pointer;
-
 
113
    position: relative;
48
	line-height: 16px;
114
    padding-left: 25px;
49
	background-repeat: no-repeat;
115
    margin-right: 15px;
50
	background-position: 0 0;
116
    font-size: 13px;
51
	/*font-size:16px;*/
117
}
-
 
118
input[type=radio] {
52
	vertical-align: middle;
119
    display: none;
53
	cursor: pointer;
120
}
54
}
121
label:before {
-
 
122
    content: "";
-
 
123
    display: inline-block;
-
 
124
 
55
 
125
    width: 16px;
56
input[type=radio].css-checkbox:checked+label.css-label {
126
    height: 16px;
57
	background-position: 0 -16px;
127
 
58
}
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
}
59
 
135
.radio label:before {
60
label.css-label {
136
    border-radius: 8px;
61
	background-image: url(../img/radio.png);
137
}
-
 
138
input[type=radio]:checked + label:before {
62
	-webkit-touch-callout: none;
139
    content: "\2022";
63
	-webkit-user-select: none;
140
    color: #f3f3f3;
64
	-khtml-user-select: none;
141
    font-size: 30px;
65
	-moz-user-select: none;
142
    text-align: center;
66
	-ms-user-select: none;
143
    line-height: 18px;
67
	user-select: none;
144
}*/
68
}
145
</style>
69
</style>
146
<?php debug($firstshowaddress);?>
-
 
147
 
-
 
148
<div class="alert alert-danger hidden" id="message"></div>
70
<div class="alert alert-danger hidden" id="message"></div>
149
<div class="alert alert-success hidden" id="message_success"></div>
71
<div class="alert alert-success hidden" id="message_success"></div>
150
<div class='container' style='margin-bottom:50px;'>
72
<div class='container' style='margin-bottom:50px;'>
151
 
73
 
152
	
74
	
Line 169... Line 91...
169
 
91
 
170
                    <?php if($i==3):?>
92
                    <?php if($i==3):?>
171
                        <div id='showmoreaddressdropdown' style='display:none;'>
93
                        <div id='showmoreaddressdropdown' style='display:none;'>
172
                    <?php endif;?>
94
                    <?php endif;?>
173
                    <?php //if(count($firstshowaddress)>$i):?>
95
                    <?php //if(count($firstshowaddress)>$i):?>
-
 
96
                    	<?php if($defaultAddressFound):?>
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";}?>'>
97
                        <div  style = 'height:100px;padding:4px;' id = "address<?php echo $firstshowaddress[$i]['id'];?>" class="myaddress <?php if($defaultaddressid == $firstshowaddress[$i]['id']){echo "addressselect";}?>">
175
 
-
 
-
 
98
                        <?php else:?>
-
 
99
                        <div  style = 'height:100px;padding:4px;' id = "address<?php echo $firstshowaddress[$i]['id'];?>" class="myaddress">
-
 
100
                        <?php endif;?>
-
 
101
							<?php if($defaultAddressFound):?>
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";}?>>
102
                           <input type="radio" class="css-checkbox" id='<?php echo $firstshowaddress[$i]['id'];?>' name="selectedaddress" <?php if($defaultaddressid == $firstshowaddress[$i]['id']){echo "checked";}?>>
177
 
-
 
-
 
103
							<?php else:?>
-
 
104
							<input type="radio" class="css-checkbox" id='<?php echo $firstshowaddress[$i]['id'];?>' name="selectedaddress">
-
 
105
							<?php endif;?>
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'];?>">
106
                           <label for="<?php echo $firstshowaddress[$i]['id'];?>" class="css-label radGroup2" data-pin="<?php echo $firstshowaddress[$i]['pin'];?>" data-id="<?php echo $firstshowaddress[$i]['id'];?>">
179
                                <?php
107
                                <?php
180
                                if(isset($address['addresses'][$firstshowaddress[$i]]['line1']) && !empty($address['addresses'][$firstshowaddress[$i]]['line1']))
108
                                if(isset($firstshowaddress[$i]['line1']) && !empty($firstshowaddress[$i]['line1']))
181
                                    {echo "Address: ",$address['addresses'][$firstshowaddress[$i]]['line1'];}
109
                                    {echo "Address: ",$firstshowaddress[$i]['line1'];}
182
                                if(isset($address['addresses'][$firstshowaddress[$i]]['line2']) && !empty($address['addresses'][$firstshowaddress[$i]]['line2']))
110
                                if(isset($firstshowaddress[$i]['line2']) && !empty($firstshowaddress[$i]['line2']))
183
                                    {echo ",",$address['addresses'][$firstshowaddress[$i]]['line2'];}
111
                                    {echo ",",$firstshowaddress[$i]['line2'];}
184
                                if(isset($address['addresses'][$firstshowaddress[$i]]['city']) && !empty($address['addresses'][$firstshowaddress[$i]]['city']))
112
                                if(isset($firstshowaddress[$i]['city']) && !empty($firstshowaddress[$i]['city']))
185
                                    {echo "<br>",$address['addresses'][$firstshowaddress[$i]]['city'];}
113
                                    {echo "<br>",$firstshowaddress[$i]['city'];}
186
                                if(isset($address['addresses'][$firstshowaddress[$i]]['state']) && !empty($address['addresses'][$firstshowaddress[$i]]['state']))
114
                                if(isset($firstshowaddress[$i]['state']) && !empty($firstshowaddress[$i]['state']))
187
                                    {echo ", ",$address['addresses'][$firstshowaddress[$i]]['state'];}
115
                                    {echo ", ",$firstshowaddress[$i]['state'];}
188
                                if(isset($address['addresses'][$firstshowaddress[$i]]['pin']) && !empty($address['addresses'][$firstshowaddress[$i]]['pin']))
116
                                if(isset($firstshowaddress[$i]['pin']) && !empty($firstshowaddress[$i]['pin']))
189
                                    {echo ",",$address['addresses'][$firstshowaddress[$i]]['pin'];}
117
                                    {echo ",",$firstshowaddress[$i]['pin'];}
190
                                ?>
118
                                ?>
191
                            </label>
119
                            </label>
192
 
120
 
193
                        </div><hr style='margin:0px;padding:0px;border-color:#58d936;'>
121
                        </div><hr style='margin:0px;padding:0px;border-color:#58d936;'>
194
                    <?php //endif;?>
122
                    <?php //endif;?>
Line 208... Line 136...
208
    <!-- End of address section -->
136
    <!-- End of address section -->
209
 
137
 
210
    <!-- Cart section started -->
138
    <!-- Cart section started -->
211
    <div class='row' style='padding:0px;' id='footer'>
139
    <div class='row' style='padding:0px;' id='footer'>
212
        <div class='col-xs-12' style='background-color:white;padding:5px; width:100%;'>
140
        <div class='col-xs-12' style='background-color:white;padding:5px; width:100%;'>
213
            <h4>Total payable Amount: Rs. 1000000/-<br>
141
            <h4>Total payable Amount: &#8377; <?php echo number_format($totalPayable);?></h4>
214
            <button class='btn btn-success'>Confirm Order via COD</button>
142
            <a href="#" style='padding-right:2px;color:blue;font-size:15px;'><u>Other Pay Option</u></a>
215
            <a href="#" style='float:right;padding-right:2px;color:blue;font-size:15px;'>Other Pay Option</a>
143
            <button class="btn btn-success confirmcheckout">Confirm Order via COD</button>
216
        </div>
144
        </div>
217
    </div>
145
    </div>
218
 
146
 
219
    <!-- Cart section end -->
147
    <!-- Cart section end -->
220
</div>
148
</div>