 <aside class="sidebar shop-sidebar sticky-sidebar-wrapper sidebar-fixed">
     <style>
         #ldClass.loading{  z-index: 111;  position: absolute;   width: 30px;    height: 30px;    top: 26px; }
     </style>
	 <script>
	 function changeFrm(k){
		 $('#frmlist').submit();
	 }
	  function updateFrm(){
 
	    $('#ldClass').addClass('loading');
	     var inps = $('#frmlist').find("input");
	     $.each(inps,function(){
	         if($(this).val()==''){ $(this).attr('disabled',true) } 
	    })
    	 setTimeout(function(){
    	      $('#frmlist').submit();
    	     
    	 }, 100);
	 	
	 }
	 function resetFrm(){
		 $('#frmlist').find('input').not('.ajx').val(0);
		 setTimeout(function(){  $('#frmlist').submit();},500);
	 }
	 </script>
	 <form method="get" action="" id="frmlist">
                            <!-- Start of Sidebar Overlay -->
                            <div class="sidebar-overlay"></div>
                            <a class="sidebar-close" href="#"><i class="close-icon"></i></a>

                            <!-- Start of Sidebar Content -->
                            <div class="sidebar-content scrollable">
                                <!-- Start of Sticky Sidebar -->
                                <div class="sticky-sidebar">
                                    <div class="filter-actions">
                                        <label>Filter :</label>
                                        <a href="<?php echo CURRENT_BASE_URL;?>"  class="btn btn-dark btn-link filter-clean">Clean All</a>
                                    </div>
                                    <!-- Start of Collapsible widget -->
                                    <div class="widget widget-collapsible">
                                        <h3 class="widget-title"><label><?php echo !empty($categoryModel) ? $categoryModel->categoryName: 'All Categories';?></label></h3>
                                        <ul class="widget-body filter-items search-ul">
											<?php
											$slgarary =array();$countlist = 0; 
											if(empty($categoryModel) ){
												foreach($main_category_filter as $k=>$v){
													echo '<li><a href="'.$this->app->createUrl('listings/index',array('slug0'=>$k)).'">'.$v.'</a></li>';
												} 
											}else{
														if(!empty($slg)){
														$slg_ist = sizeOf($slg)-1;
														foreach($slg as $k2=>$v2){
															$slgarary['slug'.$countlist] =  $k2;
															if($slg_ist==$countlist){
																echo '<li><a href="'.$this->app->createUrl('listings/index',$slgarary).'">'.$v2.'</a>';
																	if(!empty($sub_category_filter)){
																		$countlist++;
																		echo '<ul class="d-block">';
																		foreach($sub_category_filter as $k2=>$v2){
																			$slgarary['slug'.$countlist] =  $k2;
																			echo '<li><a href="'.$this->app->createUrl('listings/index',$slgarary).'">'.$v2.'</a></li>';
																			
																		}
																		echo '</ul>';
																	}
																echo '</li>';
															
															}else{
																echo '<li><a href="'.$this->app->createUrl('listings/index',$slgarary).'">'.$v2.'</a></li>';
																$countlist++;
															}
															
															}
														}
												
											}
											
											 
											?>
                                        </ul>
                                    </div>
                                    <!-- End of Collapsible Widget -->

                                    <!-- Start of Collapsible Widget -->
                                    <div class="widget widget-collapsible">
                                        <h3 class="widget-title"><label>Price (AED)</label></h3>
                                        <div class="widget-body">
											<?php
											/*
                                            <ul class="filter-items search-ul">
                                                <li><a href="#">Under $10.00</a></li>
                                                <li><a href="#">$10.00 - $50.00</a></li>
                                                <li><a href="#">$50.00 - $100.00</a></li>
                                                <li><a href="#">$100.00 - $500.00</a></li>
                                            </ul>
                                            * */
                                            ?>
                                            <div class="price-range">
                                                <input type="number" name="min_price" value="<?php echo @$_GET['min_price'];?>" class="min_price text-center"
                                                    placeholder="min"><span class="delimiter">-</span><input
                                                    type="number" name="max_price" value="<?php echo @$_GET['max_price'];?>" class="max_price text-center"
                                                    placeholder="max"><button type="button" class="btn btn-primary btn-rounded" onclick="updateFrm()">Go</button>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- End of Collapsible Widget -->

                                    <!-- Start of Collapsible Widget -->
                                    <?php
                                    if(!empty($filter_fields)){
										foreach($filter_fields as $k=>$v){ 
												$values = ShopProductAttributesValues::model()->getAttributeValues($v->attribute_id); 	
												$filter_a = @$_GET['filter'];				 
											if(empty($values)){ continue; }
											?> 
										<div class="widget widget-collapsible">
											<h3 class="widget-title"><label><?php echo $v->name;?></label></h3>
											<ul class="widget-body filter-items item-check mt-1">
												<?php
												echo CHtml::CheckBoxList('filter['.$v->id.']',@$filter_a[$v->id] ,$values,array('onchange'=>'changeFrm(this)'));
												?>
											</ul>
										</div>
										<?php 
										}
									}
                                    ?> 
                                 <!-- End of Collapsible Widget -->
                                </div>
                                <!-- End of Sidebar Content -->
                            </div>
                            <!-- End of Sidebar Content -->
                       <input type="hidden" name="sort" id="sort" value="<?php echo @$_GET['sort'];?>" onchange="updateFrm()">
                       </form>
                        </aside>
                       
