Subversion Repositories SmartDukaan

Rev

Rev 20683 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<script type="text/javascript" src="<?php echo $base_url;?>js/iscroll.js?v=<?php echo $staticversion;?>"></script>
<script type="text/javascript" src="/js/profittill.js?v=<?php echo $staticversion;?>"></script>
<script type="text/javascript" src="/js/jquery.viewport.mini.js"></script>

<script type="text/javascript">
$(document).on('click','.morebulkprice',function(e){
                e.stopPropagation();
                if($(this).find('.glyphicon').hasClass('glyphicon-chevron-down'))
                {
                        $(this).parent().parent().parent().find('.bulkpricingclass').removeClass('hidden');
                        $(this).find('.glyphicon').removeClass('glyphicon-chevron-down');
                        $(this).find('.glyphicon').addClass('glyphicon-chevron-up');
                }
                else
                {
                        $(this).parent().parent().parent().find('.bulkpricingclass').addClass('hidden');
                        $(this).find('.glyphicon').removeClass('glyphicon-chevron-up');
                        $(this).find('.glyphicon').addClass('glyphicon-chevron-down');
                }
        });

$(document).ready(function(){   
        $('.card').html(localStorage.getItem("productdetail"));
        $('.data-up:first').append('<a id="popovertrigger6"  data-container="body" data-toggle="popover" data-placement="left" data-content="Buy Now"></a>');
        showpopover("popovertrigger6", $('.row.card')[0]);
        $('.popover').css('position','fixed');
        $('.popover-content').css('padding','9px');
        try {
                $("#popovertrigger6").popover('show');
    }catch(err){                
        //
    }
                                
        setTimeout(function(){
                $("#popovertrigger6").popover('hide');
        },2000);
        setInterval(function(){
                try {
                        $("#popovertrigger6").popover('show');
                }catch(err){
                        //
                }
        setTimeout(function(){
                $("#popovertrigger6").popover('hide');
        },2000);
    },7000);
        $('.see_more_link').remove();
        var topmargin = $(".card").height();
        var value = " "+(topmargin+15)+"px 5px 5px 5px";
        $('#detailcontent').css("margin",value);
        //$('.popover').hide();
        //$('.arrow').hide();
        $('div').removeClass("accsproduct");
        $('h5').removeClass("accsproduct");
        
         $('.uvideo').click(function(){
          var href = window.location.href;
         window.history.pushState('forward', null, './'+href.substr(href.lastIndexOf('/') + 1));
      var source= $(this).data('source');
      // alert(source);
      $('#content-add').empty();
      var content = "<iframe width='100%' height='100%' src='http://www.youtube.com/embed/"+source+"?autoplay=1'></iframe>"
      value = " "+(topmargin+10)+"px 5px 5px 5px";
      $('#video-body').css("margin",value);
      $('#content-add').append(content);
      var producttitle = $(this).closest(".productdetails").find(".producttitle").html().trim();
      ga('send', 'event', 'Video Link Clicked', producttitle, me);
      $('#videoModal').modal('show');
    });
    
    if (window.history && window.history.pushState) {

        $(window).on('popstate', function() {
             $('#videoModal').modal('hide');
                 $('.text-center').empty();
        });

      }
        
    $('#videoModal').click(function(){
        $('#content-add').empty();
        window.history.back();
    });
    
    $('.close').click(function(){
      $('#videoModal').modal('hide');
      $('.text-center').empty();
    });
        
});
function loaded () {
        myScroll = new IScroll('#wrapper', { scrollX: true, scrollY: false, mouseWheel: true, click: true, tap: false ,eventPassthrough: true, bindToWrapper:true});
        }
var a;
var b;
function togglelist(e, id) {

    var el = document.getElementById(id);
    if ((a != undefined) && (b != null) && (a != el)) {
        a.style.display = 'none';
        b.innerHTML = '+';
    }
    if (el.style.display != 'none') {
        el.style.display = 'none';
        e.currentTarget.children[1].innerHTML = '+';
    } else {
        el.style.display = '';
        e.currentTarget.children[1].innerHTML = '-';
    }
    a = el;
    b = e.currentTarget.children[1];
}
</script>
<script type="text/javascript" src="/js/checkout.js?v=<?php echo $staticversion;?>"></script>
<style>
.pd-tab {
  background: #e5e6e0;
  color: #555555;
  text-transform: capitalize;
  padding: 7px 5px;
  font: 1.2em Helvetica, Arial, sans-serif;
  margin-bottom: 2px;
  width:100%;
}
.pd-tab span:nth-of-type(1) {
  float: left;
  margin-top: 3px;
}
.pd-tab span:nth-of-type(2) {
  float: right;
  font: 1.2em Helvetica, Arial, sans-serif;
}
.pd-tab-open {
  width:90%;
  margin: 10px;
}
.pd-tab-open table {
  border: #f2f3ef solid 1px;
  width: 99%;
  border-collapse: collapse;
  color: #555555;
  margin-bottom: 10px;
}
.pd-tab-open table th {
  background: #f2f3ef;
  font: 1em Helvetica, Arial, sans-serif;
  padding: 5px 0 5px 5px;
  text-align: left;
}
.pd-tab-open table td {
  font: 1em Helvetica, Arial, sans-serif;
  text-align: center;
  border-bottom: #f2f3ef solid 1px;
  padding: 5px 3px;
}
.pd-tab-open table td:nth-of-type(1) {
  border-right: #f2f3ef solid 1px;
  text-align: left;
  width: 25%;
}
.pd-tab-open table td:nth-of-type(2) {
  
  text-align: left;
  padding-left: 4px;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}
.pd-tab-open .detail-div {
  color: #555555;
  text-align: left;
  font: 1.2em Helvetica, Arial, sans-serif;
}

#wrapper {
        position: absolute;
        z-index: 1;
        top: 5px;
        bottom: 48px;
        left: 0;
        width: 100%;
        height: 210px;
        overflow: hidden;
}

#scroller {
        position: absolute;
        z-index: 1;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        /*width: 560px;*/
        
        
        -webkit-transform: translateZ(0);
        -moz-transform: translateZ(0);
        -ms-transform: translateZ(0);
        -o-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-text-size-adjust: none;
        -moz-text-size-adjust: none;
        -ms-text-size-adjust: none;
        -o-text-size-adjust: none;
        text-size-adjust: none;
}

#scroller ul {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
        
        text-align: center;
}

#scroller li {
        display: block;
        float: left;
        /*width: 140px;*/
        width: 210px;
        height: 210px;
        
        border-right: 1px solid #ccc;
        background-color: white;
        font-size: 14px;
}
.pd-images {
  padding: 5px 10px;
 
  border: #f1f1f1 solid 1
}

.goback {z-index:10; height: 32px; width: 32px; position: absolute;top:120px;padding:4px;}
</style>

<div class="modal fade" id="videoModal">
  <div class="modal-dialog">
    <div class="modal-content" id='video-body'>      
      <div class="modal-body">
        <div class="text-center" id='content-add'>
                 
        </div>        
      </div>      
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div>
<div class="modal fade" id="loadingModal">
  <div class="modal-dialog">
    <div class="modal-content">      
      <div class="modal-body">
        <div class="text-center">
          <img src="/img/ajax-loader.gif"/>          
        </div>        
      </div>      
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div>

<div style="position:fixed;z-index:2;top:-5px; background:#58d936;padding:15px 5px 2px 5px;width:100%">
<a href="javascript:history.back();"><span class="glyphicon glyphicon-remove-circle pull-right" style='left: 5px;z-index: 55;font-size: 20px;color: #555;'></span></a>
<div class="row card">


</div>
</div>

<div id = "detailcontent" style="background:white;position:relative;margin-bottom:50px;">

<div id="wrapper" style="background:white;">
        <div id="scroller" style='width: <?php echo count($dealinfo['entity']['images'])*220;?>px;'>
                <ul>
                        <?php foreach($dealinfo['entity']['images'] as $image){?>
                        <?php //echo $image['url'];?>
                        <li class='pd-images'><img src="<?php echo $image['url'];?>" height="100%" "></li>
                        
                 <?php } ?>
            </ul>
        </div>
</div>
        
        <div style="position:absolute;top:210px;width:100%;padding-bottom:55px;">
        <div style="background:white;">
                <?php if(isset($dealinfo['entity']['keySpecs']) && !empty($dealinfo['entity']['keySpecs'])):?>
                        <div class="pd-tab clearfix" >
                                <span>Highlights</span>
                        </div>
                       
                        <div class="pd-tab-open" id="tab1">
                          <div class="detail-div">
                                 <?php foreach($dealinfo['entity']['keySpecs'] as $value):?>
                                        <?php echo "<div>".$value."</div>";?>
                                 <?php endforeach;?>   
                          </div>
                        </div>
                <?php endif;?>

                <?php if(isset($dealinfo['entity']['packageContents']) && !empty($dealinfo['entity']['packageContents'])):?>
                        <div class="pd-tab clearfix" >
                          <span>Package Contents</span>
                        </div>
                               
                        <div class="pd-tab-open" id="tab1">
                          <div class="detail-div">
                                 <?php foreach($dealinfo['entity']['packageContents'] as $value):?>
                                        <?php echo "<div>".$value."</div>";?>
                                 <?php endforeach;?>   
                          </div>
                        </div>
                <?php endif;?>

                <?php if(isset($dealinfo['entity']['detailedSpecs']) && !empty($dealinfo['entity']['detailedSpecs'])):?>
                        <div class="pd-tab clearfix" onclick="togglelist(event,'tab2')">
                          <span>Detailed Specifications</span><span>-</span>
                        </div>
                               
                        <div class="pd-tab-open" id="tab2" style="width:96%;">
                          <div class="detail-div">
                                 <?php foreach($dealinfo['entity']['detailedSpecs'] as $key=> $value):?>
                                        <table>
                                          <tr>
                                            <th colspan="2"><?php echo $value['title']; ?></th>
                                          </tr>
                                           <?php foreach ($value['specs'] as $item) {?>
                                            <tr>
                                              <td><?php echo $item['name'];?></td>
                                              <td><?php echo implode('<br>',$item['values']);?></td>
                                            </tr>
                                           <?php }?>
                                        </table>
                                 <?php endforeach;?>   
                          </div>
                        </div>
                <?php endif;?>
        </div>
        </div>

</div>

<?php echo $this->element('footer');?>