Subversion Repositories SmartDukaan

Rev

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

Rev 11280 Rev 11731
Line 32... Line 32...
32
        <div><?php echo $product_detail->name;?></div>
32
        <div><?php echo $product_detail->name;?></div>
33
        <?php if(isset($product_detail->warranty) && !empty($product_detail->warranty)){?>
33
        <?php if(isset($product_detail->warranty) && !empty($product_detail->warranty)){?>
34
        <div><?php echo $product_detail->warranty;?></div><?php } ?>
34
        <div><?php echo $product_detail->warranty;?></div><?php } ?>
35
      </div><!--pd-name-->
35
      </div><!--pd-name-->
36
      <?php if(count($product_detail->images) == 1){?>
36
      <?php if(count($product_detail->images) == 1){?>
37
      <div class="pd-images tcenter rec-hldr" id="swipe_0">
37
      <div class="pd-images tcenter rec-hldr">
38
        <div class="pd-wrapper">
38
        <div class="pd-wrapper">
39
          <div class="pd-image" style="background:url('<?php echo $product_detail->images[0]->url;?>')no-repeat center center;background-size:contain;"></div>
39
          <div class="pd-image" style="background:url('<?php echo $product_detail->images[0]->url;?>')no-repeat center center;background-size:contain;"></div>
40
        </div>
40
        </div>
41
      </div><!--pd-images-->
41
      </div><!--pd-images-->
42
      <?php } else{ ?>
42
      <?php } else{ ?>
43
      <div class="pd-images">
43
      <div class="pd-images" id="swipe_0">
44
        <div class="pd-wrapper">
44
        <div class="pd-wrapper">
45
          <?php foreach($product_detail->images as $image){?>
45
          <?php foreach($product_detail->images as $image){?>
46
          <div class="pd-image" style="background:url('<?php echo $image->url;?>')no-repeat center center;background-size:contain;"></div>
46
          <div class="pd-image" style="background:url('<?php echo $image->url;?>')no-repeat center center;background-size:contain;"></div>
47
          <?php } ?>
47
          <?php } ?>
48
        </div>
48
        </div>
-
 
49
        <div id="view-more" onclick="showAll()">View All Images</div>
49
      </div><!--pd-images-->
50
      </div><!--pd-images-->
50
      <?php } ?>
51
      <?php } ?>
51
            <div class="pd-price-cont clearfix">
52
            <div class="pd-price-cont clearfix">
52
        <div class="btn-hldr clearfix">
53
        <div class="btn-hldr clearfix">
53
          <?php if(isset($color) && !empty($color) && count($color)>1){?>
54
          <?php if(isset($color) && !empty($color) && count($color)>1){?>
Line 171... Line 172...
171
        <?php } ?>
172
        <?php } ?>
172
        <?php if(isset($product_detail->reocmmendedAccessories) && !empty($product_detail->reocmmendedAccessories)){?>
173
        <?php if(isset($product_detail->reocmmendedAccessories) && !empty($product_detail->reocmmendedAccessories)){?>
173
            <div class="recommended-pd">
174
            <div class="recommended-pd">
174
        <div class="head">
175
        <div class="head">
175
        <div>Recommended Accessories</div>
176
        <div>Recommended Accessories</div>
-
 
177
        <div id="viewmore_1" onclick="showAll1()">View More</div>
176
        </div>
178
        </div>
177
        <div class="rec-hldr" id="swipe_1">
179
        <div class="rec-hldr" id="swipe_1">
178
        <div class="rec-wrapper">
180
        <div class="rec-wrapper">
179
        <?php foreach ($product_detail->reocmmendedAccessories as $item) { ?>
181
        <?php foreach ($product_detail->reocmmendedAccessories as $item) { ?>
180
        <a class="rec-product" href="<?php echo $item->url;?>" onclick="trackAccessories('<?php echo $item->title;?>')">
182
        <a class="rec-product" href="<?php echo $item->url;?>" onclick="trackAccessories('<?php echo $item->title;?>')">
Line 187... Line 189...
187
        </div><!--rec-hldr-->
189
        </div><!--rec-hldr-->
188
      </div><!--recomended-pd-->
190
      </div><!--recomended-pd-->
189
      <?php  } } ?>
191
      <?php  } } ?>
190
      <script type="text/javascript">
192
      <script type="text/javascript">
191
      var items = <?php echo json_encode($product_detail->items);?>
193
      var items = <?php echo json_encode($product_detail->items);?>
192
      </script>
-
 
193
      <script type="text/javascript">
-
 
194
 
-
 
195
  var isIE10 = false;
-
 
196
 
-
 
197
  /*@cc_on
-
 
198
 
-
 
199
   if (/^10/.test(@_jscript_version)) {
-
 
200
 
-
 
201
   isIE10 = true;
-
 
202
 
-
 
203
   }
-
 
204
 
-
 
205
   @*/
-
 
206
 
-
 
207
  var iOS = navigator.userAgent.match(/(iPad|iPhone|iPod)/g);
-
 
208
 
-
 
209
  var ua = navigator.userAgent;
-
 
210
 
-
 
211
  var userAgent = navigator.userAgent.toLowerCase();
-
 
212
 
-
 
213
  if (isIE10) {
-
 
214
       var a = document.getElementsByClassName('rec-hldr');
-
 
215
      
-
 
216
          for (var i = 0; i < a.length; i++) {
-
 
217
      
-
 
218
            a[i].style.overflowX = 'auto';
-
 
219
      
-
 
220
          }
-
 
221
      
-
 
222
        }
-
 
223
        
-
 
224
        else if (ua.indexOf("Android") >= 0) {
-
 
225
 
-
 
226
          var androidversion = parseFloat(ua.slice(ua.indexOf("Android") + 8));
-
 
227
        
-
 
228
         if (androidversion < 3.0) {
-
 
229
 
-
 
230
       var script = document.createElement("script");
-
 
231
 
-
 
232
      script.type = "text/javascript";
-
 
233
 
-
 
234
      script.src = base_url+'assets/js/iscroll.js'
-
 
235
 
-
 
236
      document.body.appendChild(script);
-
 
237
 
-
 
238
      script.onload = function() {
-
 
239
 
-
 
240
        var point, pointStartX, pointStartY, deltaX, deltaY;
-
 
241
 
-
 
242
        var i, scroller = [], len = document.getElementsByClassName('rec-hldr').length;
-
 
243
 
-
 
244
        var scrollerArray = document.getElementsByClassName('rec-hldr');
-
 
245
 
-
 
246
           for ( i = 0; i < scrollerArray.length; i++) {     
-
 
247
 
-
 
248
          var length = scrollerArray[i].children.length;
-
 
249
 
-
 
250
          scroller[i] = new iScroll("swipe_"+ i, {
-
 
251
 
-
 
252
            bounce : true,
-
 
253
 
-
 
254
            momentum : true,
-
 
255
 
-
 
256
            //hScroll: true,
-
 
257
 
-
 
258
            vScroll : false,
-
 
259
 
-
 
260
            hScrollbar : false,
-
 
261
 
-
 
262
            vScrollbar : false,
-
 
263
 
-
 
264
            snap : true,
-
 
265
 
-
 
266
            onBeforeScrollStart : function(e) {
-
 
267
 
-
 
268
              console.log("onBeforeScrollStart");
-
 
269
 
-
 
270
              point = e.touches[0];
-
 
271
 
-
 
272
              pointStartX = point.pageX;
-
 
273
 
-
 
274
              pointStartY = point.pageY; null;
-
 
275
 
-
 
276
            },
-
 
277
 
-
 
278
            onBeforeScrollMove : function(e) {
-
 
279
 
-
 
280
              console.log(e);
-
 
281
 
-
 
282
              point = e.touches[0];
-
 
283
 
-
 
284
              //alert("onBeforeScrollMove");
-
 
285
 
-
 
286
              deltaX = Math.abs(point.pageX - pointStartX);
-
 
287
 
-
 
288
              deltaY = Math.abs(point.pageY - pointStartY);
-
 
289
 
-
 
290
              if (deltaX >= deltaY) {
-
 
291
                e.preventDefault();
-
 
292
 
-
 
293
                // alert("horizontal");
-
 
294
 
-
 
295
              } else {
-
 
296
 
-
 
297
                //alert("vertical");
-
 
298
 
-
 
299
                null;
-
 
300
 
-
 
301
              }
-
 
302
 
-
 
303
            }
-
 
304
          });
-
 
305
 
-
 
306
 
-
 
307
 
-
 
308
        setTimeout(function() {
-
 
309
 
-
 
310
          for ( i = 0; i < len; i++) {
-
 
311
 
-
 
312
            scroller[i].refresh();
-
 
313
 
-
 
314
          }
-
 
315
 
-
 
316
        }, 100);
-
 
317
        }
-
 
318
 
-
 
319
      }
-
 
320
       }else {
-
 
321
 
-
 
322
      var a = document.getElementsByClassName('rec-hldr');
-
 
323
 
-
 
324
       for (var i = 0; i < a.length; i++) {
-
 
325
 
-
 
326
        a[i].style.overflowX = 'auto';
-
 
327
 
-
 
328
        a[i].style.webkitOverflowScrolling = 'touch';
-
 
329
 
-
 
330
      }
-
 
331
 
-
 
332
    }
-
 
333
    
-
 
334
    }else if (iOS) {
-
 
335
 
-
 
336
    if (navigator.userAgent.match(/(iPad|iPhone|iPod|iPod touch);.*CPU.*OS (6|7)_\d/i) ? true : false) {
-
 
337
    
-
 
338
     var a = document.getElementsByClassName('rec-hldr');
-
 
339
      for (var i = 0; i < a.length; i++) {
-
 
340
        a[i].style.overflowX = 'auto';
-
 
341
        a[i].style.overflowY = 'hidden';
-
 
342
        a[i].style.webkitOverflowScrolling = 'touch';
-
 
343
      }
-
 
344
 
-
 
345
    }else{
-
 
346
      
-
 
347
       var script = document.createElement("script");
-
 
348
 
-
 
349
      script.type = "text/javascript";
-
 
350
 
-
 
351
      script.src = base_url+'assets/js/iscroll.js'
-
 
352
 
-
 
353
      document.body.appendChild(script);
-
 
354
 
-
 
355
      script.onload = function() {
-
 
356
 
-
 
357
        var point, pointStartX, pointStartY, deltaX, deltaY;
-
 
358
 
-
 
359
        var i, scroller = [], len = document.getElementsByClassName('rec-wrapper').length;
-
 
360
 
-
 
361
        var scrollerArray = document.getElementsByClassName('rec-wrapper');
-
 
362
 
-
 
363
     
-
 
364
 
-
 
365
          //var length = scrollerArray[i].children.length;
-
 
366
 
-
 
367
          scroller[i] = new iScroll(swipe_1, {
-
 
368
 
-
 
369
            bounce : true,
-
 
370
 
-
 
371
            momentum : true,
-
 
372
 
-
 
373
            //hScroll: true,
-
 
374
 
-
 
375
            vScroll : false,
-
 
376
 
-
 
377
            hScrollbar : false,
-
 
378
 
-
 
379
            vScrollbar : false,
-
 
380
 
-
 
381
            snap : true,
-
 
382
 
-
 
383
            onBeforeScrollStart : function(e) {
-
 
384
 
-
 
385
              console.log("onBeforeScrollStart");
-
 
386
 
-
 
387
              point = e.touches;
-
 
388
 
-
 
389
              pointStartX = point.pageX;
-
 
390
 
-
 
391
              pointStartY = point.pageY; null;
-
 
392
 
-
 
393
            },
-
 
394
 
-
 
395
            onBeforeScrollMove : function(e) {
-
 
396
 
-
 
397
              console.log(e);
-
 
398
 
-
 
399
              point = e.touches;
-
 
400
 
-
 
401
              //alert("onBeforeScrollMove");
-
 
402
 
-
 
403
              deltaX = Math.abs(point.pageX - pointStartX);
-
 
404
 
-
 
405
              deltaY = Math.abs(point.pageY - pointStartY);
-
 
406
 
-
 
407
              if (deltaX >= deltaY) {
-
 
408
                e.preventDefault();
-
 
409
 
-
 
410
                // alert("horizontal");
-
 
411
 
-
 
412
              } else {
-
 
413
 
-
 
414
                //alert("vertical");
-
 
415
 
-
 
416
                null;
-
 
417
 
-
 
418
              }
-
 
419
 
-
 
420
            }
-
 
421
          });
-
 
422
      
-
 
423
    }
-
 
424
    
-
 
425
    }
-
 
426
    
-
 
427
    }else if (ua.indexOf("BlackBerry") >= 0 || ua.indexOf("BB10") >= 0) {
-
 
428
 
-
 
429
    var a = document.getElementsByClassName('rec-hldr');
-
 
430
 
-
 
431
    for (var i = 0; i < a.length; i++) {
-
 
432
 
-
 
433
      a[i].style.overflowX = 'auto';
-
 
434
 
-
 
435
      a[i].style.webkitOverflowScrolling = 'touch';
-
 
436
    }
-
 
437
 
-
 
438
  }
-
 
439
 
-
 
440
</script>
-
 
441
194
      </script>
-
 
195
442
196