Subversion Repositories SmartDukaan

Rev

Rev 19661 | Rev 19931 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


<script type="text/javascript" src="<?php echo $base_url;?>js/iscroll.js"></script>
<script type="text/javascript" src="<?php echo $base_url;?>js/deals.js?v=<?php echo $staticversion;?>"></script>
<script type="text/javascript">
function loaded () {
        myScroll = new IScroll('#wrapper', { scrollX: true, scrollY: false, mouseWheel: true, click: true, tap: true });
        myScroll1 = new IScroll('#wrapper1', { scrollX: true, scrollY: false, mouseWheel: true, click: true, tap: true });
}</script>


<script>
$(document).ready(function(){

        var scrollerwidth = 0;
        var scroller1width = 0;
        $('#scroller li').each(function() {
            var $this = $(this);
            scrollerwidth =scrollerwidth + $this.outerWidth() + 4;
        });
        var scrollerwidth = ""+(scrollerwidth + 2)+"px";
        $('#scroller1 li').each(function() {
            var $this = $(this);
            scroller1width =scroller1width + $this.outerWidth() + 10;
        });
        var scroller1width = ""+(scroller1width + 2)+"px";
        
    $('#scroller').css("width",scrollerwidth);
    $('#scroller1').css("width",scroller1width);
        
});
</script>
<style>
.activate{
        color:green;
}
#wrapper,#wrapper1 {
        z-index: 1;
        bottom: 48px;
        left: 0;
        overflow: hidden;
}
#wrapper{
        max-height:40px;
        width: 97%;
        padding: 0px 5px;
        min-height: 0px;
}
#wrapper1{
        height:30px;
        width: 100%;
}

#scroller, #scroller1 {
        z-index: 1;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -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,#scroller1 ul {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;    
        text-align: center;
}

#scroller li, #scroller1 li {
        display: block;
        float: left;
        margin:2px;
        color:white;
        border-right: 1px solid #ccc;
        background-color: #F2DEDE;
        font-size: 12px;
}
#scroller li{
        font-weight:bold;
        padding: 7px;
        height: 37px;
        border-radius:5px;
        vertical-align:middle;
        font-size: 11px;
        min-width: 67px;
        max-width: 92px;
        text-transform: uppercase;
/*      overflow: hidden ; */
        }
#scroller1 li {
        color: #555;
    padding: 5px;
    background : none;
    height: 23px;
    border : #E5E5E5 1px solid;
    margin:3px;
    text-transform: uppercase;
    font-size: 10px;
}

.cancelstyle{
        font-weight:bold;
        background: black;
    padding: 1px 3px;
    color: white;
        border-radius: 4px;
        
}
</style>
<?php
        if(isset($subcategories)){
                $catstr = explode("^",$subcategories);
        }
        
?>

 <ul class="nav nav-tabs catselect">
<?php foreach($categories AS $catId => $name):?>
        
        <li class=" tab_layout <?php if((isset($id)) && $catId == $id):?>active<?php endif;?> col-xs-<?php echo (12/(count($categories)));?>">
            <a href="/category/<?php echo $catId;?>"<?php if($id!=6 && $catId==6):?> id="popovertrigger4" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Accessories at wholesale rates"<?php endif;?>>
                <?php if($catId==6):?>
                        Accessories
                <?php else:?>
                        <?php echo $name;?>
                <?php endif;?>
            </a>
    </li>
<?php endforeach;?>             
</ul>

<?php if(isset($id)):?>

<div class="filters row" >      
<!-- For apps tab -->           
<?php if($id==2):?>
        <div class="text-center">
                <div class="text_arrange cb">                           
                        
                  <div class="card row" >
                        <a href = "<?php echo $base_url;?>appb"><span style="color:red;font-size:1.1em">Earn upto Rs. 10,000 per month</span> 
                                <!-- <u style="font-size:.9em">SEE HOW</u> -->
                                <button type="button" class="btn btn-primary btn-sm">SEE HOW</button>
                        </a><br>
                        <!--<span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>--><a href = "<?php echo $base_url;?>appb" style="font-size:1em; color:black"> Download these free apps for your customer.</a>
            <hr style="margin:1px;">
            <ul class="list-unstyled " style='margin:1px';>
                <li class="row row_style" >
                        <div class="row showtips" style="font-size:.9em">
                                <br>
                                <div class='col-xs-11'>
                                        <font color= 'grey'>Normally cashbacks are not approved for 30-40% cases.</font><br> <font color='red'>Click here </font>to see tips on increasing your profit. 
                                </div>
                                <div class='col-xs-1'><span class="glyphicon glyphicon-chevron-down"></span></div>
                        </div>
                  </div>
                  <div class="apptips hidden" style="background:#fff;">
                    <div class="row">
                        
                        <div class="col-xs-12" style='padding:1px'>
                                <ol style="text-align:left;background:#f9fafb">
                                        <li>Only install new apps</li>
                                        <li>Keep network connected after installing apps</li>                           
                                        <li>Open the app 4-5 minutes after installing</li>
                                        <li>Preferably register and login on app</li>
                                </ol>
                        </div>
                        
                    </div>
                  </div>              
                </li>
            </ul>
            <hr style="margin:1px;">
                </div>
        </div>          
<?php endif;?>  
<!-- End of apps tab code -->
<?php if(isset($notification) && !empty($notification)):?>
        <?php if($notification['NotificationRule']['type']=='link'):?>
        <div class="alert alert-info text-center col-xs-12">
                <a target="_blank" href="<?php echo $notification['NotificationRule']['url'].'?user_id='.$logged_user['id'];?>" class="webnotification"><?php echo $notification['NotificationRule']['message'];?></a>
        </div>
        <?php elseif($notification['NotificationRule']['type']=='popup'):?>
        <?php 
                $url = $notification['NotificationRule']['url'];
                if(strpos($url, '?')!==false){
                        $url .= '&user_id='.$logged_user['id'];
                }else{
                        $url .= '?user_id='.$logged_user['id'];
                }
        ?>
        <div class="herotext col-xs-9" style='padding-top:0px'>
                <!-- Daily profitable deals for you -->
                <?php //echo $this->element('headerlinks',array(),array());?>
                <script type="text/javascript">
                        $(function(){
                                $('.notificationMessage').html('<?php echo $notification['NotificationRule']['message'];?>');
                                $('.notificationUrl').prop('href','<?php echo $url;?>').data('id','<?php echo $notification['NotificationRule']['id'];?>');
                                if(showpopup(<?php echo $notification['NotificationRule']['id'];?>,<?php echo $notification['NotificationRule']['popup_display_count'];?>,<?php echo $notification['NotificationRule']['popup_display_interval'];?>)) {
                                        $('#notificationModal'+'<?php echo ucfirst($notification['NotificationRule']['popup_type']);?>').modal({show: true,keyboard: false,backdrop: 'static'});        
                                        var postdata = {'user_id':me,'notification_rule_id':'<?php echo $notification['NotificationRule']['id'];?>'};
                                        $.post( "/notification_views/add", postdata, function( data ) {});              
                                        ga('send', 'event', 'popupnotification-<?php echo $notification['NotificationRule']['id'];?>', 'shown', me);    
                                        var properties = {};
                                        properties.id = String('<?php echo $notification['NotificationRule']['id'];?>');
                                        pma.send('popupnotification','shown','<?php echo $notification['NotificationRule']['type'];?>',me,properties);                  
                                }
                        });
                </script>
        </div>
        <?php endif;?>
<?php endif;?>


        <?php if((isset($id) && $id == 6) && ((!isset($brands) || ( isset($brands) && empty($brands))) && (!isset($subcategories) || (isset($subcategories) && empty($subcategories))))):?>
        
        <div class="col-xs-12 herotext" style='padding-top:0px'> 
        
                        <?php echo $this->element('headerlinks',array(),array());?>
        
        </div>
        

        <?php elseif($id!=2):?>
        <div class="col-xs-9 herotext" style='padding-top:0px'>                 
                                
                <?php if((isset($id) && $id == 6)) :?>
                        <div id="wrapperboss" style="position:relative;">
                                <!-- crossfilter start -->
                                
                                <div id="wrapper1" style="background:white;">
                                                <div id="scroller1">
                                                        <ul>
                                                                
                                                                <?php foreach($allbrandsubcat['idListInfo'] as $akey => $avalue ):?>
                                                                        <li class="upselect mtop getcancel quickclick" data-type="<?php if(isset($whatfirst)&&!empty($whatfirst)):?><?php echo $whatfirst;?><?php endif;?>" data-<?php echo $whatfirst."id";?>="<?php echo $akey;?>" ><?php echo $avalue;?> <span class="cancelstyle"> X </span></li>
                                                                <?php endforeach;?>
                                                                
                                                                <?php foreach($allbrandsubcat['result'] as $ckey => $cvalue ):?>
                                                                        <?php if(in_array($cvalue[$whatsecondid],$secondloop)):?>
                                                                                <li class="upselect getcancel quickclick" data-type="<?php if(isset($whatsecond)&&!empty($whatsecond)):?><?php echo $whatsecond;?><?php endif;?>" data-<?php echo $whatsecond."id";?>="<?php echo $cvalue[$whatsecondid];?>">
                                                                                <?php echo $cvalue[$whatsecond];?> <span class="cancelstyle"> X </span>
                                                                                </li>
                                                                        <?php endif;?>
                                                                <?php endforeach;?>
                                                                
                                                    </ul>
                                                </div>
                                        </div>
                                
                                <!-- crossfilter end -->
                                
                        
                        </div>
                    <?php else:?>
                        <?php echo $this->element('headerlinks',array(),array());?>
                <!-- Daily profitable deals for you                             -->
                    <?php endif;?>
                
        </div>   
         
             
        <div class="col-xs-3 pt7">
                <?php if((isset($brands) && !empty($brands)) || (isset($subcategories) && !empty($subcategories))):?>
                                <a class="btn btn-xs btn-danger filteraction clearfilters pull-right mr5" id="clearfilters" style="margin-top: 4px;padding: 2px 16px; background: #efefef !important;border: 1px; color: #333!important;font-size: 12px;"> RESET </a>
                        <?php endif;?>  
        </div>
        <?php endif;?> 
                        
<?php if((isset($id) && $id == 6)):?>

<?php else:?>
                        <?php if(isset($id) && ($id==3 || $id==5)):?>
                                                        <div class = 'col-xs-3 bg-white' style='float:left'>

                                                                <ul class="nav">
                                                                        <li class="tab_layout <?php if($id!=2):?>bg-white<?php endif;?>">
                                                                                <?php if($id!=2):?>
                                                                                <div class="dropdown pull-right">
                                                                                        <a tabindex="0" id="popovertrigger" role="button" class="btn" data-container="body" data-toggle="popover" data-placement="left" data-trigger="click" data-content="<span class='greentext'>Filter by brands</span> to see deals you want"></a>
                                                                                        <button class="<?php if((isset($brands) && !empty($brands)) || (isset($subcategories) && !empty($subcategories))):?>red-text<?php endif;?> btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
                                                                                                <i class="glyphicon glyphicon-filter"></i> <?php if ((isset($brands) && !empty($brands)) || (isset($subcategories) && !empty($subcategories))):?>On<?php endif;?>         
                                                                                                <span class="caret"></span>
                                                                                        </button>
                                                                                        <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenu1">
                                                                                                <li role="presentation" class="dropdown-header menu-item">
                                                                                                        FILTER
                                                                                                        
                                                                        
                                                                                                        <?php if((isset($brands) && !empty($brands)) || (isset($subcategories) && !empty($subcategories))):?>
                                                                                                        <button class="btn btn-xs clearfilters btn-danger filteraction" style="position: absolute;right: -5px;top: 5px;" id="clearfilters">Reset</button>
                                                                                                <?php endif;?>  
                                                                                                </li>
                                                                                                <!-- <By subcategory started> -->
                                                                                                <?php if ($id==6):?>
                                                                                                <li role="presentation" class="menu-item"><a role="menuitem" tabindex="-1" href="<?php echo $base_url;?>subcategoryfilter/subcategory<?php if(isset($id)):?>/<?php echo $id;?><?php endif;?>/?<?php echo $_SERVER["QUERY_STRING"];?>">By Product <span class="greyarrow"></span></a></li>
                                                                                                <?php endif;?>

                                                                                                <!-- <By subcategory ended> -->
                                                                                        
                                                                                                <li role="presentation" class="menu-item"><a role="menuitem" tabindex="-1" href="<?php echo $base_url;?>filter/brand<?php if(isset($id)):?>/<?php echo $id;?><?php endif;?>/?<?php echo $_SERVER["QUERY_STRING"];?>">By Brands <span class="greyarrow"></span></a></li>

                                                                                                
                                                                                                

                                                                                                <!-- <li role="presentation" class="menu-item"><a role="menuitem" tabindex="-1" href="#">Price-range</a></li> -->
                                                                                                <!-- <li role="presentation" class="menu-item"><a role="menuitem" tabindex="-1" href="#">Sub-category</a></li> -->
                                                                                                <li role="presentation" class="dropdown-header menu-item">SORT</li>
                                                                                                <li role="presentation" class="menu-item <?php if(isset($sortlabel) && $sortlabel == 'bestseller'):?>selected<?php endif;?>"><a role="menuitem" tabindex="-1" href="?sort=bestSellerPoints&direction=-1<?php if(isset($filterstr)):?><?php echo $filterstr;?><?php endif;?>">Bestsellers</a></li>
                                                                                                <li role="presentation" class="menu-item <?php //if(isset($sort) && $sort == 'available_price'):?><?php //endif;?>">
                                                                                                        <span class="sortlabel">Price</span> 
                                                        <a role="menuitem" tabindex="-1" href="?sort=available_price&direction=1<?php echo $filterstr;?>" class="btn-asc btn btn-xs" <?php if(isset($sortlabel) && $sortlabel == 'pricelow'):?> style="background:#36d98a;" <?php endif;?>>Low</a>
                                                        <a role="menuitem" tabindex="-1" href="?sort=available_price&direction=-1<?php echo $filterstr;?>" class="btn-desc btn-xs" <?php if(isset($sortlabel) && $sortlabel == 'pricehigh'):?> style="background:#36d98a;" <?php endif;?>>High</a>
                                                                                                </li>
                                                                                                <!-- <li role="presentation" class="menu-item <?php if(isset($sort) && $sort == 'available_price' && $direction=='-1'):?>selected<?php endif;?>"><a role="menuitem" tabindex="-1" href="?sort=available_price&direction=-1">Price High to Low</a></li> -->
                                                                                                <li role="presentation" class="menu-item<?php if(isset($sortlabel) && $sortlabel == 'recommended'):?> selected<?php endif;?>"><a role="menuitem" tabindex="-1" href="?sort=-1<?php echo $filterstr;?>">Recommended</a></li>
                                                                                        </ul>
                                                                                </div>
                                                                                <?php endif;?>
                                                                        </li>   
                                                                </ul>   
                                                        </div>  
                        <?php endif; ?>
<?php endif;?>
</div>

<?php if((isset($id) && $id == 6) && ((isset($brands) && !empty($brands)) || (isset($subcategories) && !empty($subcategories))) && (isset($allbrandsubcat) && !empty($allbrandsubcat))):?>
<!-- for quickfilter start-->
                                <div style="background:white;">
                                <div id="wrapper" style="background:white;">
                                                <div id="scroller">
                                                        <ul>
                                                        <?php $colorcount = 0;?>
                                                        <?php foreach($allbrandsubcat['result'] as $bkey => $bvalue ):?>
                                                                <?php if(!in_array($bvalue[$whatsecondid],$secondloop)):?>
                                                                <?php $strarr = explode(" ", $bvalue[$whatsecond]);?>
                                                                        <li class="downselect quickclick" data-type="<?php if(isset($whatsecond)&&!empty($whatsecond)):?><?php echo $whatsecond;?><?php endif;?>" data-<?php echo $whatsecond."id";?>="<?php echo $bvalue[$whatsecondid];?>" style="background:<?php echo $color[$colorcount];?>; <?php if(strlen($bvalue[$whatsecond]) >9 && sizeof($strarr)>1):?> font-size: 10px;line-height: 12px;<?php elseif(strlen($bvalue[$whatsecond]) <=9 && sizeof($strarr)>1):?>line-height: 12px;<?php else:?>line-height: 24px;<?php endif;?>">
                                                                                
                                                                                <?php 
                                                                                        echo $strarr[0]; 
                                                                                        if(sizeof($strarr) >1){
                                                                                                echo "<br>";
                                                                                                for($abs = 1; $abs< sizeof($strarr);$abs++)
                                                                                                {
                                                                                                        echo $strarr[$abs]." ";
                                                                                                }       
                                                                                        }                                                                       
                                                                                        
                                                                                        
                                                                                        
                                                                                ?>
                                                                                
                                                                        </li>
                                                                        <?php $colorcount = $colorcount+1;
                                                                                if($colorcount == 6)
                                                                                {
                                                                                        $colorcount = 0;
                                                                                }
                                                                        ?>
                                                                <?php endif;?>
                                                        <?php endforeach;?>
                                                    </ul>
                                                </div>
                                        </div>
                                </div>
<!-- for quickfilter end-->
<?php endif;?>

<?php endif;?>