<?php /* Smarty version Smarty-3.1.8, created on 2020-01-09 16:19:48
         compiled from "/home/agmc/public_html/beta/application/core/views/frontend/mini/BrandCategories.tpl" */ ?>
<?php /*%%SmartyHeaderCode:4234638925e171a64833317-36074769%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '238e7007663a60bb95ec11b8711546b23cf713fb' => 
    array (
      0 => '/home/agmc/public_html/beta/application/core/views/frontend/mini/BrandCategories.tpl',
      1 => 1577772525,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '4234638925e171a64833317-36074769',
  'function' => 
  array (
    'brandcategories' => 
    array (
      'parameter' => 
      array (
        'level' => 0,
      ),
      'compiled' => '',
    ),
  ),
  'variables' => 
  array (
    'data' => 0,
    'level' => 0,
    'productCategory' => 0,
    'catSelKeys' => 0,
    'attrKey' => 0,
    'readOnlyVarCat' => 0,
    'prodCatID' => 0,
    'attrCatChecked' => 0,
    'readOnlyVar' => 0,
    'brandName' => 0,
    'elementCount' => 0,
    'counter' => 0,
    'productCategoryChildren' => 0,
    'CategoryMenus' => 0,
  ),
  'has_nocache_code' => 0,
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_5e171a64895500_07938110',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5e171a64895500_07938110')) {function content_5e171a64895500_07938110($_smarty_tpl) {?><ul  class="brand-cat-list clearfix">
	 
	<?php if (!function_exists('smarty_template_function_brandcategories')) {
    function smarty_template_function_brandcategories($_smarty_tpl,$params) {
    $saved_tpl_vars = $_smarty_tpl->tpl_vars;
    foreach ($_smarty_tpl->smarty->template_functions['brandcategories']['parameter'] as $key => $value) {$_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);};
    foreach ($params as $key => $value) {$_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);}?>
		<?php  $_smarty_tpl->tpl_vars["productCategory"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["productCategory"]->_loop = false;
 $_smarty_tpl->tpl_vars["pid"] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["productCategory"]->key => $_smarty_tpl->tpl_vars["productCategory"]->value){
$_smarty_tpl->tpl_vars["productCategory"]->_loop = true;
 $_smarty_tpl->tpl_vars["pid"]->value = $_smarty_tpl->tpl_vars["productCategory"]->key;
?> 
			<li  data-level="<?php echo $_smarty_tpl->tpl_vars['level']->value;?>
" rel="<?php echo $_smarty_tpl->tpl_vars['level']->value;?>
"  class="level-<?php echo $_smarty_tpl->tpl_vars['level']->value;?>
">
                                <?php $_smarty_tpl->tpl_vars["prodCatID"] = new Smarty_variable($_smarty_tpl->tpl_vars['productCategory']->value['productCategoryID'], null, 0);?>
                                <?php $_smarty_tpl->tpl_vars["attrKey"] = new Smarty_variable((($tmp = @$_smarty_tpl->tpl_vars['productCategory']->value['productCategoryKey'])===null||$tmp==='' ? '' : $tmp), null, 0);?> 
				
                                
                                <?php $_smarty_tpl->tpl_vars["readOnlyVarCat"] = new Smarty_variable('', null, 0);?>                  
                                <?php $_smarty_tpl->tpl_vars["attrCatChecked"] = new Smarty_variable('', null, 0);?>

                                  <?php if ((($tmp = @$_smarty_tpl->tpl_vars['catSelKeys']->value)===null||$tmp==='' ? '' : $tmp)){?>
                                     <?php if (in_array($_smarty_tpl->tpl_vars['attrKey']->value,$_smarty_tpl->tpl_vars['catSelKeys']->value)){?>
                                         <?php $_smarty_tpl->tpl_vars["attrCatChecked"] = new Smarty_variable("checked", null, 0);?> 
                                     <?php }else{ ?>
                                          <?php $_smarty_tpl->tpl_vars["readOnlyVarCat"] = new Smarty_variable("disabled", null, 0);?>
                                     <?php }?>
                                  <?php }else{ ?>


                                  <?php }?>
				<?php if ($_smarty_tpl->tpl_vars['level']->value==1){?> 
                                  <?php ob_start();?><?php echo count($_smarty_tpl->tpl_vars['productCategory']->value['children']);?>
<?php $_tmp1=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['attrKey']->value;?>
<?php $_tmp2=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['attrCatChecked']->value;?>
<?php $_tmp3=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->checkbox(array('disabled'=>($_smarty_tpl->tpl_vars['readOnlyVarCat']->value),'refinehead'=>($_smarty_tpl->tpl_vars['prodCatID']->value)."_".($_smarty_tpl->tpl_vars['productCategory']->value['productCategoryParent'])."_".$_tmp1,'refineval'=>($_smarty_tpl->tpl_vars['productCategory']->value['productCategoryName']),'refinevalparent'=>($_smarty_tpl->tpl_vars['productCategory']->value['productCategoryParent']),'id'=>"searchAttrCatID_".($_smarty_tpl->tpl_vars['attrKey']->value),'class'=>"searchAttrCatID parent_".($_smarty_tpl->tpl_vars['productCategory']->value['productCategoryParent']),'name'=>"searchAttrCatID[]",'value'=>$_tmp2,'checked'=>$_tmp3,'rel'=>$_smarty_tpl->tpl_vars['prodCatID']->value),$_smarty_tpl);?>

                                        <label disabled="<?php echo $_smarty_tpl->tpl_vars['readOnlyVar']->value;?>
" class="attributeSearchLabel" id="searchAttrCatLabel_<?php echo $_smarty_tpl->tpl_vars['prodCatID']->value;?>
" for="searchAttrCatID_<?php echo $_smarty_tpl->tpl_vars['attrKey']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['brandName']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['productCategory']->value['productCategoryName'];?>
</label>
					
				<?php }else{ ?>
                                  <?php ob_start();?><?php echo count($_smarty_tpl->tpl_vars['productCategory']->value['children']);?>
<?php $_tmp4=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['attrKey']->value;?>
<?php $_tmp5=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['attrCatChecked']->value;?>
<?php $_tmp6=ob_get_clean();?><?php echo $_smarty_tpl->smarty->registered_objects['form'][0]->checkbox(array('disabled'=>($_smarty_tpl->tpl_vars['readOnlyVarCat']->value),'refinehead'=>($_smarty_tpl->tpl_vars['prodCatID']->value)."_".($_smarty_tpl->tpl_vars['productCategory']->value['productCategoryParent'])."_".$_tmp4,'refineval'=>($_smarty_tpl->tpl_vars['productCategory']->value['productCategoryName']),'refinevalparent'=>($_smarty_tpl->tpl_vars['productCategory']->value['productCategoryParent']),'id'=>"searchAttrCatID_".($_smarty_tpl->tpl_vars['attrKey']->value),'class'=>"searchAttrCatID child_".($_smarty_tpl->tpl_vars['prodCatID']->value),'name'=>"searchAttrCatID[]",'value'=>$_tmp5,'checked'=>$_tmp6,'rel'=>$_smarty_tpl->tpl_vars['prodCatID']->value),$_smarty_tpl);?>

                                        <label disabled="<?php echo $_smarty_tpl->tpl_vars['readOnlyVar']->value;?>
" class="attributeSearchLabel" id="searchAttrCatLabel_<?php echo $_smarty_tpl->tpl_vars['prodCatID']->value;?>
" for="searchAttrCatID_<?php echo $_smarty_tpl->tpl_vars['attrKey']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['brandName']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['productCategory']->value['productCategoryName'];?>
</label>
					 
				<?php }?>
			<?php if (isset($_smarty_tpl->tpl_vars['productCategory']->value['children'])&&is_array($_smarty_tpl->tpl_vars['productCategory']->value['children'])&&!empty($_smarty_tpl->tpl_vars['productCategory']->value['children'])){?>
				<?php $_smarty_tpl->tpl_vars["elementCount"] = new Smarty_variable(count($_smarty_tpl->tpl_vars['productCategory']->value['children'])/3, null, 0);?>
				<?php $_smarty_tpl->tpl_vars["elementCount"] = new Smarty_variable(ceil($_smarty_tpl->tpl_vars['elementCount']->value), null, 0);?>
				<?php if ($_smarty_tpl->tpl_vars['elementCount']->value>0){?>
					<?php if ($_smarty_tpl->tpl_vars['level']->value<1){?><span class="expand collaps"></span>
					<div class="brand-cat-group clearfix" > 
					<?php }?>
						<?php $_smarty_tpl->tpl_vars["productCategoryChildren"] = new Smarty_variable(array_chunk($_smarty_tpl->tpl_vars['productCategory']->value['children'],3), null, 0);?>
						<?php  $_smarty_tpl->tpl_vars['counter'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['counter']->value = 0;
  if ($_smarty_tpl->tpl_vars['counter']->value<$_smarty_tpl->tpl_vars['elementCount']->value){ for ($_foo=true;$_smarty_tpl->tpl_vars['counter']->value<$_smarty_tpl->tpl_vars['elementCount']->value; $_smarty_tpl->tpl_vars['counter']->value++){
?>
						<ul class="categoryUL_<?php echo $_smarty_tpl->tpl_vars['productCategory']->value['productCategoryKey'];?>
"> 
						<?php smarty_template_function_brandcategories($_smarty_tpl,array('data'=>$_smarty_tpl->tpl_vars['productCategoryChildren']->value[$_smarty_tpl->tpl_vars['counter']->value],'level'=>$_smarty_tpl->tpl_vars['level']->value+1));?>
 
						</ul>
						<?php }} ?>
					<?php if ($_smarty_tpl->tpl_vars['level']->value<1){?>
					</div>
						
					<?php }?>
					
				<?php }else{ ?>
					<ul > 
					<?php smarty_template_function_brandcategories($_smarty_tpl,array('data'=>$_smarty_tpl->tpl_vars['productCategory']->value['children'],'level'=>$_smarty_tpl->tpl_vars['level']->value+1));?>
 
					</ul>
				<?php }?>
			<?php }else{ ?>
				<?php if ((is_array($_smarty_tpl->tpl_vars['productCategory']->value))&&(isset($_smarty_tpl->tpl_vars['productCategory']->value['menuItemID']))&&(is_numeric($_smarty_tpl->tpl_vars['productCategory']->value['menuItemID']))){?>
				</li>	
				<?php }?>
			<?php }?>
		<?php } ?>  
	<?php $_smarty_tpl->tpl_vars = $saved_tpl_vars;}}?>

	<?php smarty_template_function_brandcategories($_smarty_tpl,array('data'=>$_smarty_tpl->tpl_vars['CategoryMenus']->value));?>
 
</ul>
<script type="text/javascript">
$(document).ready(function(e) {
   $(".collaps").click(function() {
		$(this).toggleClass("expand");
		$(this).next(".brand-cat-group").slideToggle();
	});
});	
</script>


		
<?php }} ?>