Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
10582 lgm 1
 
2
<?php
3
 if($stylesheet != 'authorize.css'){
4
//print_r($data);
11732 lgm 5
$route = $this -> router -> fetch_module();
10582 lgm 6
$data = $response['footer'];
7
if(isset($data) and !empty($data))
8
{
9
foreach($data as $headkey=>$value)
10
{
11
	if(isset($value['render']) and !empty($value['render']))
12
	{
13
		unset($value['render']);
14
		if(isset($value) and !empty($value))
15
		$this->load->view($this->layoutName.$headkey,array($headkey=>$value));
16
	else
17
		$this->load->view($this->layoutName.$headkey);
18
	}
19
	else
20
		{ 
21
			if(isset($value) and !empty($value) and count($value)>1)
13554 anikendra 22
				{ 
23
					//echo 'data list here';
24
				}
10582 lgm 25
		}
26
 
27
 
28
}
29
 
30
}
31
}
32
?>
33
 
34
<div class="mask" onclick="toggleOverlay(event)"></div>
11760 lgm 35
 <div class="welcome-popup" ></div>
36
       <div class="popup">
11789 lgm 37
            <img src="<?php echo base_url().'assets/images/logo.PNG'; ?>" alt="saholic"/>
11760 lgm 38
            <p>Try our new mobile site</p>
12524 anikendra 39
            <!--<div class="btn m-btn" onclick="removePopup(event);_gaq.push(['_trackEvent', 'MobileSite', 'Popup', '<?php echo uri_string();?>']);">continue</div>-->
40
            <div class="btn m-btn" onclick="removePopup(event);ga('send', 'event', 'MobileSite', 'Popup', '<?php echo uri_string();?>');">continue</div>
41
            <!--<a onClick="_gaq.push(['_trackEvent', 'Outbound', 'Popup', '<?php echo uri_string();?>']);" class="desktop-link" href="http://www.saholic.com/<?php echo uri_string();?>/?fullbrowser=true&utm_source=mobile_site">Go to Desktop Site</a>-->
42
            <a onClick="ga('send', 'event', 'Outbound', 'Popup', '<?php echo uri_string();?>');" class="desktop-link" href="http://www.saholic.com/<?php echo uri_string();?>/?fullbrowser=true&utm_source=mobile_site">Go to Desktop Site</a>
11760 lgm 43
        </div><!--popup-->
10582 lgm 44
 
45
			</div><!--container-->
46
		<script src="<?=base_url()?>assets/js/common.js?version=<?=$this->config->item('cdn_version');?>" type="text/javascript"></script>	
11521 lgm 47
  		<script src='<?=base_url().$this->config->item('current_client')?>/js/search_bar.js?version=<?=$this->config->item('cdn_version');?>' type="text/javascript"></script>
11717 lgm 48
  		<?php 
49
			$userAgent = $_SERVER['HTTP_USER_AGENT'];
50
			if (strripos($userAgent,'Opera') == 0) {?>
11785 anikendra 51
				<script pagespeed_no_defer="" data-pace-options='{ "startOnPageLoad": false }' src='<?=base_url()?>assets/js/pace.js' type="text/javascript"></script>
11717 lgm 52
		<?php } ?>
11731 lgm 53
<!--Start product detail js-->
54
<?php if(isset($route) && $route == 'productinfo'){?>
55
<script type="text/javascript">             
56
  var isOperaMini = (navigator.userAgent.indexOf('Opera Mini') > -1);
11724 anikendra 57
 
11731 lgm 58
    if(isOperaMini ){
16634 amit.gupta 59
     document.gpetElementById('view-more').style.display = 'block';
11731 lgm 60
     document.getElementById('viewmore_1').style.display = 'block';
61
    }
62
    var len = document.getElementById('swipe_0').children[0].children.length;
16634 amit.gupta 63
    var len1 = 0;
64
 
65
    swipe1 = document.getElementById('swipe_1')
66
    if (swipe1 != null) {
67
    	len1 = swipe1.children[0].children.length;
68
    }
69
 
11731 lgm 70
  	var count = 1
71
  	function showAll(){
72
 
73
   	if(count == 1){
74
    	document.getElementById('view-more').innerHTML = 'Close';
75
    	document.getElementById('swipe_0').children[0].style.whiteSpace = 'inherit';
76
    	document.getElementById('swipe_0').children[0].style.display = 'block';
77
    	for(var i =0; i< len;i++){
78
     		document.getElementsByClassName('pd-image')[i].style.width = '100%';
79
    	}
80
    	count = 2; 
81
   	}else{
82
     	document.getElementById('view-more').innerHTML = 'View All';
83
     	document.getElementById('swipe_0').children[0].style.whiteSpace = 'nowrap';
84
    	document.getElementById('swipe_0').children[0].style.display = 'inline-block';
85
    	for(var i =0; i< len;i++){
86
     	document.getElementsByClassName('pd-image')[i].style.width = '';
87
    	}
88
    	count = 1;
89
   	} 
90
  }
91
 
92
  var count1 = 1
93
    function showAll1(){
94
      if(count1 ==1){
95
        document.getElementById('viewmore_1').innerHTML = 'Close';
96
        document.getElementById('swipe_1').children[0].style.whiteSpace = 'inherit';
97
        document.getElementById('swipe_1').children[0].style.display = 'block';
98
        for(var i =0; i< len1;i++){
99
         document.getElementsByClassName('rec-product')[i].style.width = '50%';
100
          if(i%2 == 0){
101
            document.getElementsByClassName('rec-product')[i].style.cssFloat = 'left';  
102
           }else{
103
            document.getElementsByClassName('rec-product')[i].style.cssFloat = 'right';
104
            document.getElementsByClassName('rec-product')[i].style.border = 'none';
105
          }
106
        }
107
        count1 = 2;    
108
      }else{
109
        document.getElementById('viewmore_1').innerHTML = 'View More';
110
        document.getElementById('swipe_1').children[0].style.whiteSpace = 'nowrap';
111
        document.getElementById('swipe_1').children[0].style.display = 'inline-block';
112
        for(var i =0; i< len1;i++){
113
         document.getElementsByClassName('rec-product')[i].style.width = '';
114
          if(i%2 == 0){
115
            document.getElementsByClassName('rec-product')[i].style.cssFloat = '';  
116
           }else{
117
            document.getElementsByClassName('rec-product')[i].style.cssFloat = '';
118
            document.getElementsByClassName('rec-product')[i].style.border = '';
119
          }
120
        }
121
        count1 = 1;
122
      }
123
 
124
  }  
125
  var isIE10 = false;
126
 
127
  /*@cc_on
128
 
129
   if (/^10/.test(@_jscript_version)) {
130
 
131
   isIE10 = true;
132
 
133
   }
134
 
135
   @*/
136
 
137
  var iOS = navigator.userAgent.match(/(iPad|iPhone|iPod)/g);
138
 
139
  var ua = navigator.userAgent;
140
 
141
  var userAgent = navigator.userAgent.toLowerCase();
142
 
143
  if (isIE10) {
144
       var a = document.getElementsByClassName('rec-hldr');
145
 
146
          for (var i = 0; i < a.length; i++) {
147
 
148
            a[i].style.overflowX = 'auto';
149
 
150
          }
151
 
152
        }
153
 
154
        else if (ua.indexOf("Android") >= 0) {
155
 
156
          var androidversion = parseFloat(ua.slice(ua.indexOf("Android") + 8));
157
 
158
         if (androidversion < 3.0) {
159
 
160
       var script = document.createElement("script");
161
 
162
      script.type = "text/javascript";
163
 
164
      script.src = base_url+'assets/js/iscroll.js'
165
 
166
      document.body.appendChild(script);
167
 
168
      script.onload = function() {
169
 
170
        var point, pointStartX, pointStartY, deltaX, deltaY;
171
 
172
        var i, scroller = [], len = document.getElementsByClassName('rec-hldr').length;
173
 
174
        var scrollerArray = document.getElementsByClassName('rec-hldr');
175
 
176
           for ( i = 0; i < scrollerArray.length; i++) {     
177
 
178
          var length = scrollerArray[i].children.length;
179
 
180
          scroller[i] = new iScroll("swipe_"+ i, {
181
 
182
            bounce : true,
183
 
184
            momentum : true,
185
 
186
            //hScroll: true,
187
 
188
            vScroll : false,
189
 
190
            hScrollbar : false,
191
 
192
            vScrollbar : false,
193
 
194
            snap : true,
195
 
196
            onBeforeScrollStart : function(e) {
197
 
198
 
199
              point = e.touches[0];
200
 
201
              pointStartX = point.pageX;
202
 
203
              pointStartY = point.pageY; null;
204
 
205
            },
206
 
207
            onBeforeScrollMove : function(e) {
208
 
209
 
210
              point = e.touches[0];
211
 
212
              //alert("onBeforeScrollMove");
213
 
214
              deltaX = Math.abs(point.pageX - pointStartX);
215
 
216
              deltaY = Math.abs(point.pageY - pointStartY);
217
 
218
              if (deltaX >= deltaY) {
219
                e.preventDefault();
220
 
221
                // alert("horizontal");
222
 
223
              } else {
224
 
225
                //alert("vertical");
226
 
227
                null;
228
 
229
              }
230
 
231
            }
232
          });
233
        setTimeout(function() {
234
 
235
          for ( i = 0; i < len; i++) {
236
 
237
            scroller[i].refresh();
238
 
239
          }
240
 
241
        }, 100);
242
        }
243
 
244
      }
245
       }else {
246
 
247
      var a = document.getElementsByClassName('rec-hldr');
248
 
249
       for (var i = 0; i < a.length; i++) {
250
 
251
        a[i].style.overflowX = 'auto';
252
 
253
        a[i].style.webkitOverflowScrolling = 'touch';
254
 
255
      }
256
 
257
    }
258
 
259
    }else if (iOS) {
260
 
261
    if (navigator.userAgent.match(/(iPad|iPhone|iPod|iPod touch);.*CPU.*OS (6|7)_\d/i) ? true : false) {
262
 
263
     var a = document.getElementsByClassName('rec-hldr');
264
      for (var i = 0; i < a.length; i++) {
265
        a[i].style.overflowX = 'auto';
266
        a[i].style.overflowY = 'hidden';
267
        a[i].style.webkitOverflowScrolling = 'touch';
268
      }
269
 
270
    }else{
271
       var script = document.createElement("script");
272
      script.type = "text/javascript";
273
      script.src = base_url+'assets/js/iscroll.js'
274
      document.body.appendChild(script);
275
      script.onload = function() {
276
        var point, pointStartX, pointStartY, deltaX, deltaY;
277
        var i, scroller = [], len = document.getElementsByClassName('rec-wrapper').length;
278
        var scrollerArray = document.getElementsByClassName('rec-wrapper');
279
          //var length = scrollerArray[i].children.length;
280
          scroller[i] = new iScroll(swipe_1, {
281
            bounce : true,
282
            momentum : true,
283
            //hScroll: true,
284
            vScroll : false,
285
            hScrollbar : false,
286
            vScrollbar : false,
287
            snap : true,
288
            onBeforeScrollStart : function(e) {
289
              point = e.touches;
290
              pointStartX = point.pageX;
291
              pointStartY = point.pageY; null;
292
            },
293
            onBeforeScrollMove : function(e) {
294
              point = e.touches;
295
              //alert("onBeforeScrollMove");
296
              deltaX = Math.abs(point.pageX - pointStartX);
297
              deltaY = Math.abs(point.pageY - pointStartY);
298
              if (deltaX >= deltaY) {
299
                e.preventDefault();
300
                // alert("horizontal");
301
              } else {
302
                //alert("vertical");
303
                null;
304
              }
305
            }
306
          });
307
    }
308
    }
309
    }else if (ua.indexOf("BlackBerry") >= 0 || ua.indexOf("BB10") >= 0) {
310
    var a = document.getElementsByClassName('rec-hldr');
311
    for (var i = 0; i < a.length; i++) {
312
      a[i].style.overflowX = 'auto';
313
      a[i].style.webkitOverflowScrolling = 'touch';
314
    }
315
  }
316
</script>
317
<?php } ?>
318
<!--End product detail js-->
11752 lgm 319
<script>
13306 anikendra 320
  document.getElementsByClassName('welcome-popup')[0].style.display = 'none';
321
  document.getElementsByClassName('popup')[0].style.display = 'none';
322
      /*
11752 lgm 323
    if(getCOOKIE('flag') == 1){
324
        document.getElementsByClassName('welcome-popup')[0].style.display = 'none';
325
        document.getElementsByClassName('popup')[0].style.display = 'none';
326
 
327
      }else{
328
        document.getElementsByClassName('welcome-popup')[0].style.display = 'block';
329
        document.getElementsByClassName('popup')[0].style.display = 'block';
330
        document.getElementsByClassName("welcome-popup")[0].style.minHeight = document.getElementsByTagName('body')[0].clientHeight + "px";
13306 anikendra 331
      }*/
332
 
11752 lgm 333
 </script>
11724 anikendra 334
<!-- Start Alexa Certify Javascript -->
335
<script type="text/javascript">
336
_atrk_opts = { atrk_acct:"N82Fj1agtu00gJ", domain:"saholic.com",dynamic: true};
337
(function() { var as = document.createElement('script'); as.type = 'text/javascript'; as.async = true; as.src = "https://d31qbv1cthcecs.cloudfront.net/atrk.js"; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(as, s); })();
338
</script>
339
<noscript><img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=N82Fj1agtu00gJ" style="display:none" height="1" width="1" alt="" /></noscript>
13306 anikendra 340
 
10582 lgm 341
  </body>
342
</html>
343
 
344
 
11724 anikendra 345
<!-- <p>Page rendered in <strong>{elapsed_time}</strong> seconds</p> -->