<ul>
<?php
if(!empty($this->rows)){
foreach($this->rows as $k => $row){
if($only_if_products && $row->number_of_products<1) continue;
$link = $this->getLink($row->category_id,$row->alias);
?>
<li>
<a href="<?php echo $link;?>">
<?php
echo $row->category_name;
if($this->params->get('number_of_products',0)){
echo ' ('.$row->number_of_products.')';
}
?>
</a>
<ul class="hikashop_category_list<?php echo $this->params->get('ul_class_name'); ?>"><?php
if(!empty($row->childs)){
$app = JFactory::getApplication();
$found='';
if(JRequest::getString('option')==HIKASHOP_COMPONENT && in_array(JRequest::getString('ctrl','category'),array('category','product'))){
if(JRequest::getString('ctrl','category')=='product'&&JRequest::getString('task','listing')=='show'){
$found = $app->getUserState(HIKASHOP_COMPONENT.'.last_category_selected');
$config =& hikashop_config();
$pathway_sef_name = $config->get('pathway_sef_name','category_pathway');
$cid = JRequest::getInt($pathway_sef_name,0);
}else{
$cid = JRequest::getInt('cid',0);
}
foreach($row->childs as $child){
if($cid == $child->category_id){
$found=$child->category_id;
$app->setUserState(HIKASHOP_COMPONENT.'.last_category_selected',$child->category_id);
break;
}
}
}
$limit = $this->params->get('child_limit');
$i = 0;
foreach($row->childs as $child){
if($only_if_products && $child->number_of_products<1) continue;
if(!empty($limit) && $i >= $limit){
break;
}
$i++;
$link = $this->getLink($child->category_id,$child->alias);
$class = '';
if($found==$child->category_id){
$class=' current active';
}
?>
<li class="hikashop_category_list_item<?php echo $class; ?>">
<a href="<?php echo $link; ?>">
<?php
echo $child->category_name;
if($this->params->get('number_of_products',0)){
echo ' ('.$child->number_of_products.')';
}
?>
</a>
</li>
<?php
}
}else {
echo JText::_('HIKA_LISTING_LIST_EMPTY');
}
?></ul>
</il><?php
}
}
?></ul>
Please note that we're already far from user support and this is already custom code development...