| 10863 |
lgm |
1 |
<!--offers-->
|
| 11169 |
lgm |
2 |
<!-- <div class="recharge-head">Recharge</div> -->
|
|
|
3 |
<div class="offers clearfix">
|
|
|
4 |
<a href="<?php echo base_url().'recharge'?>" class="recharge-btn btn" onclick="changeRecharge('1');">Mobile Recharge</a>
|
|
|
5 |
<a href="<?php echo base_url().'recharge'?>" onclick="changeRecharge('2');" class="offer-btn btn">DTH Recharge</a>
|
|
|
6 |
</div><!--offers-->
|
| 10582 |
lgm |
7 |
<?php
|
|
|
8 |
if(isset($home_featured_product) and !empty($home_featured_product) and count($home_featured_product)>0){
|
|
|
9 |
?>
|
|
|
10 |
<div class="recommended-pd">
|
|
|
11 |
<div class="head">
|
|
|
12 |
<div>Featured products</div>
|
| 11715 |
lgm |
13 |
<div id="view-more" onclick="showAll()" style="display:none;">View More</div>
|
| 10582 |
lgm |
14 |
</div>
|
| 11251 |
lgm |
15 |
<div class="rec-hldr" id="swipe_0">
|
| 10582 |
lgm |
16 |
<div class="rec-wrapper">
|
|
|
17 |
<?php foreach ($home_featured_product as $product) {?>
|
| 11731 |
lgm |
18 |
<a class="rec-product" href="<?php echo $product['url']; ?>">
|
| 11037 |
lgm |
19 |
<img src="<?php echo $product['image_url']; ?>" alt="recomended" onerror="imgDefault()"/>
|
| 10582 |
lgm |
20 |
<div class="pd-name"><?php echo $product['title']; ?></div>
|
|
|
21 |
<div class="pd-desc"><?php echo $product['description']; ?></div>
|
| 16269 |
amit.gupta |
22 |
<div class="pd-price"><span>Rs</span><span><?php if(isset($product['mrp'])){echo $product['mrp']; }?> </span><span><?php echo $product['price']; ?></span></div>
|
| 10582 |
lgm |
23 |
</a><!--rec-product-->
|
|
|
24 |
<?php } ?>
|
|
|
25 |
</div>
|
|
|
26 |
</div><!--rec-hldr-->
|
|
|
27 |
</div><!--recomended-pd-->
|
|
|
28 |
<?php
|
|
|
29 |
}
|
|
|
30 |
else
|
|
|
31 |
{
|
|
|
32 |
//echo 'API\'s not returning any value. Please Contact Super Administrator! - '.basename(__FILE__).'<br>';
|
|
|
33 |
}?>
|
|
|
34 |
|
|
|
35 |
<script type="text/javascript">
|
|
|
36 |
|
| 11715 |
lgm |
37 |
var isOperaMini = (navigator.userAgent.indexOf('Opera Mini') > -1);
|
|
|
38 |
|
| 11731 |
lgm |
39 |
if(isOperaMini ){
|
| 11715 |
lgm |
40 |
document.getElementById('view-more').style.display = 'block';
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
var len = document.getElementById('swipe_0').children[0].children.length;
|
|
|
44 |
|
| 11731 |
lgm |
45 |
var count1 = 1;
|
| 11715 |
lgm |
46 |
function showAll(){
|
| 11731 |
lgm |
47 |
if(count1 ==1){
|
|
|
48 |
document.getElementById('view-more').innerHTML = 'Close';
|
|
|
49 |
document.getElementById('swipe_0').children[0].style.whiteSpace = 'inherit';
|
|
|
50 |
document.getElementById('swipe_0').children[0].style.display = 'block';
|
|
|
51 |
for(var i =0; i< len;i++){
|
|
|
52 |
document.getElementsByClassName('rec-product')[i].style.width = '50%';
|
|
|
53 |
if(i%2 == 0){
|
|
|
54 |
document.getElementsByClassName('rec-product')[i].style.cssFloat = 'left';
|
|
|
55 |
}else{
|
|
|
56 |
document.getElementsByClassName('rec-product')[i].style.cssFloat = 'right';
|
|
|
57 |
document.getElementsByClassName('rec-product')[i].style.border = 'none';
|
|
|
58 |
}
|
|
|
59 |
}
|
|
|
60 |
count1 = 2;
|
|
|
61 |
}else{
|
|
|
62 |
document.getElementById('view-more').innerHTML = 'View More';
|
|
|
63 |
document.getElementById('swipe_0').children[0].style.whiteSpace = 'nowrap';
|
|
|
64 |
document.getElementById('swipe_0').children[0].style.display = 'inline-block';
|
|
|
65 |
for(var i =0; i< len;i++){
|
|
|
66 |
document.getElementsByClassName('rec-product')[i].style.width = '';
|
|
|
67 |
if(i%2 == 0){
|
|
|
68 |
document.getElementsByClassName('rec-product')[i].style.cssFloat = '';
|
|
|
69 |
}else{
|
|
|
70 |
document.getElementsByClassName('rec-product')[i].style.cssFloat = '';
|
|
|
71 |
document.getElementsByClassName('rec-product')[i].style.border = '';
|
|
|
72 |
}
|
|
|
73 |
}
|
|
|
74 |
count1 = 1;
|
| 11715 |
lgm |
75 |
}
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
|
| 10582 |
lgm |
79 |
var isIE10 = false;
|
|
|
80 |
|
|
|
81 |
/*@cc_on
|
|
|
82 |
|
|
|
83 |
if (/^10/.test(@_jscript_version)) {
|
|
|
84 |
|
|
|
85 |
isIE10 = true;
|
|
|
86 |
|
|
|
87 |
}
|
|
|
88 |
|
|
|
89 |
@*/
|
|
|
90 |
|
|
|
91 |
var iOS = navigator.userAgent.match(/(iPad|iPhone|iPod)/g);
|
|
|
92 |
|
|
|
93 |
var ua = navigator.userAgent;
|
|
|
94 |
|
|
|
95 |
var userAgent = navigator.userAgent.toLowerCase();
|
|
|
96 |
|
|
|
97 |
if (isIE10) {
|
|
|
98 |
|
|
|
99 |
var a = document.getElementsByClassName('rec-hldr');
|
|
|
100 |
|
|
|
101 |
for (var i = 0; i < a.length; i++) {
|
|
|
102 |
|
|
|
103 |
a[i].style.overflowX = 'auto';
|
|
|
104 |
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
} else if (ua.indexOf("Android") >= 0) {
|
|
|
108 |
|
|
|
109 |
var androidversion = parseFloat(ua.slice(ua.indexOf("Android") + 8));
|
|
|
110 |
|
|
|
111 |
if (androidversion < 3.0) {
|
|
|
112 |
|
|
|
113 |
var script = document.createElement("script");
|
|
|
114 |
|
|
|
115 |
script.type = "text/javascript";
|
|
|
116 |
|
|
|
117 |
script.src = base_url+'assets/js/iscroll-lite-min.m.js'
|
|
|
118 |
|
|
|
119 |
document.body.appendChild(script);
|
|
|
120 |
|
|
|
121 |
script.onload = function() {
|
|
|
122 |
|
|
|
123 |
var point, pointStartX, pointStartY, deltaX, deltaY;
|
|
|
124 |
|
|
|
125 |
var i, scroller = [], len = document.getElementsByClassName('rec-wrapper').length;
|
|
|
126 |
|
|
|
127 |
var scrollerArray = document.getElementsByClassName('rec-wrapper');
|
|
|
128 |
|
|
|
129 |
for ( i = 0; i < scrollerArray.length; i++) {
|
|
|
130 |
|
|
|
131 |
var length = scrollerArray[i].children.length;
|
|
|
132 |
|
|
|
133 |
scroller[i] = new iScroll("swipe_" + i, {
|
|
|
134 |
|
|
|
135 |
bounce : true,
|
|
|
136 |
|
|
|
137 |
momentum : true,
|
|
|
138 |
|
|
|
139 |
//hScroll: true,
|
|
|
140 |
|
|
|
141 |
vScroll : false,
|
|
|
142 |
|
|
|
143 |
hScrollbar : false,
|
|
|
144 |
|
|
|
145 |
vScrollbar : false,
|
|
|
146 |
|
|
|
147 |
snap : true,
|
|
|
148 |
|
|
|
149 |
onBeforeScrollStart : function(e) {
|
|
|
150 |
|
|
|
151 |
|
|
|
152 |
point = e.touches[0];
|
|
|
153 |
|
|
|
154 |
pointStartX = point.pageX;
|
|
|
155 |
|
| 11251 |
lgm |
156 |
pointStartY = point.pageY;
|
|
|
157 |
null;
|
| 10582 |
lgm |
158 |
|
|
|
159 |
},
|
|
|
160 |
|
|
|
161 |
onBeforeScrollMove : function(e) {
|
|
|
162 |
|
|
|
163 |
point = e.touches[0];
|
|
|
164 |
|
|
|
165 |
//alert("onBeforeScrollMove");
|
|
|
166 |
|
|
|
167 |
deltaX = Math.abs(point.pageX - pointStartX);
|
|
|
168 |
|
|
|
169 |
deltaY = Math.abs(point.pageY - pointStartY);
|
|
|
170 |
|
| 10863 |
lgm |
171 |
if (deltaX >= deltaY) {
|
| 10582 |
lgm |
172 |
e.preventDefault();
|
|
|
173 |
|
|
|
174 |
// alert("horizontal");
|
|
|
175 |
|
|
|
176 |
} else {
|
|
|
177 |
|
|
|
178 |
//alert("vertical");
|
|
|
179 |
|
|
|
180 |
null;
|
|
|
181 |
|
|
|
182 |
}
|
|
|
183 |
|
|
|
184 |
}
|
|
|
185 |
});
|
|
|
186 |
|
|
|
187 |
}
|
|
|
188 |
|
|
|
189 |
setTimeout(function() {
|
|
|
190 |
|
|
|
191 |
for ( i = 0; i < len; i++) {
|
|
|
192 |
|
|
|
193 |
scroller[i].refresh();
|
|
|
194 |
|
|
|
195 |
}
|
|
|
196 |
|
|
|
197 |
}, 100);
|
|
|
198 |
|
|
|
199 |
}
|
|
|
200 |
} else {
|
|
|
201 |
|
|
|
202 |
var a = document.getElementsByClassName('rec-hldr');
|
|
|
203 |
|
|
|
204 |
for (var i = 0; i < a.length; i++) {
|
|
|
205 |
|
|
|
206 |
a[i].style.overflowX = 'auto';
|
|
|
207 |
|
|
|
208 |
a[i].style.webkitOverflowScrolling = 'touch';
|
|
|
209 |
|
|
|
210 |
}
|
|
|
211 |
|
|
|
212 |
}
|
|
|
213 |
|
|
|
214 |
} else if (iOS) {
|
|
|
215 |
|
|
|
216 |
if (navigator.userAgent.match(/(iPad|iPhone|iPod|iPod touch);.*CPU.*OS (6|7)_\d/i) ? true : false) {
|
|
|
217 |
|
|
|
218 |
var a = document.getElementsByClassName('rec-hldr');
|
|
|
219 |
for (var i = 0; i < a.length; i++) {
|
|
|
220 |
a[i].style.overflowX = 'auto';
|
|
|
221 |
a[i].style.overflowY = 'hidden';
|
|
|
222 |
a[i].style.webkitOverflowScrolling = 'touch';
|
|
|
223 |
}
|
|
|
224 |
|
|
|
225 |
} else {
|
|
|
226 |
|
|
|
227 |
var script = document.createElement("script");
|
|
|
228 |
|
|
|
229 |
script.type = "text/javascript";
|
|
|
230 |
|
|
|
231 |
script.src = base_url+'assets/js/iscroll-lite-min.m.js';
|
|
|
232 |
|
|
|
233 |
document.body.appendChild(script);
|
|
|
234 |
|
|
|
235 |
script.onload = function() {
|
|
|
236 |
|
|
|
237 |
var point, pointStartX, pointStartY, deltaX, deltaY;
|
|
|
238 |
|
|
|
239 |
var i, scroller = [], len = document.getElementsByClassName('rec-wrapper').length;
|
|
|
240 |
|
|
|
241 |
var scrollerArray = document.getElementsByClassName('rec-wrapper');
|
|
|
242 |
|
|
|
243 |
for ( i = 0; i < scrollerArray.length; i++) {
|
|
|
244 |
|
|
|
245 |
var length = scrollerArray[i].children.length;
|
|
|
246 |
|
|
|
247 |
scroller[i] = new iScroll("swipe_" + i, {
|
|
|
248 |
|
|
|
249 |
bounce : true,
|
|
|
250 |
|
|
|
251 |
momentum : true,
|
|
|
252 |
|
|
|
253 |
//hScroll: true,
|
|
|
254 |
|
|
|
255 |
vScroll : false,
|
|
|
256 |
|
|
|
257 |
hScrollbar : false,
|
|
|
258 |
|
|
|
259 |
vScrollbar : false,
|
|
|
260 |
|
|
|
261 |
snap : true,
|
|
|
262 |
|
|
|
263 |
onBeforeScrollStart : function(e) {
|
|
|
264 |
|
|
|
265 |
|
|
|
266 |
point = e.touches[0];
|
|
|
267 |
|
|
|
268 |
pointStartX = point.pageX;
|
|
|
269 |
|
|
|
270 |
pointStartY = point.pageY; null;
|
|
|
271 |
|
|
|
272 |
},
|
|
|
273 |
|
|
|
274 |
onBeforeScrollMove : function(e) {
|
|
|
275 |
|
|
|
276 |
|
|
|
277 |
point = e.touches[0];
|
|
|
278 |
|
|
|
279 |
//alert("onBeforeScrollMove");
|
|
|
280 |
|
|
|
281 |
deltaX = Math.abs(point.pageX - pointStartX);
|
|
|
282 |
|
|
|
283 |
deltaY = Math.abs(point.pageY - pointStartY);
|
|
|
284 |
|
|
|
285 |
if (deltaX >= deltaY) {
|
|
|
286 |
|
|
|
287 |
e.preventDefault();
|
|
|
288 |
|
|
|
289 |
// alert("horizontal");
|
|
|
290 |
|
|
|
291 |
} else {
|
|
|
292 |
|
|
|
293 |
//alert("vertical");
|
|
|
294 |
|
|
|
295 |
null;
|
|
|
296 |
|
|
|
297 |
}
|
|
|
298 |
|
|
|
299 |
}
|
|
|
300 |
});
|
|
|
301 |
|
|
|
302 |
}
|
|
|
303 |
|
|
|
304 |
setTimeout(function() {
|
|
|
305 |
|
|
|
306 |
for ( i = 0; i < len; i++) {
|
|
|
307 |
|
|
|
308 |
scroller[i].refresh();
|
|
|
309 |
|
|
|
310 |
}
|
|
|
311 |
|
|
|
312 |
}, 100);
|
|
|
313 |
|
|
|
314 |
}
|
|
|
315 |
}
|
|
|
316 |
|
| 10863 |
lgm |
317 |
} else if (ua.indexOf("BlackBerry") >= 0 || ua.indexOf("BB10") >= 0) {
|
| 10582 |
lgm |
318 |
|
|
|
319 |
var a = document.getElementsByClassName('rec-hldr');
|
|
|
320 |
|
|
|
321 |
for (var i = 0; i < a.length; i++) {
|
|
|
322 |
|
|
|
323 |
a[i].style.overflowX = 'auto';
|
|
|
324 |
|
|
|
325 |
a[i].style.webkitOverflowScrolling = 'touch';
|
|
|
326 |
}
|
|
|
327 |
|
|
|
328 |
}
|
| 11037 |
lgm |
329 |
|
|
|
330 |
function imgDefault(){
|
|
|
331 |
this.event.srcElement.src = base_url+'/assets/images/default-img.jpg';
|
|
|
332 |
}
|
| 11938 |
anikendra |
333 |
</script>
|