Post by kd5cna » Thu Jul 28, 2011 2:15 pm

I have seen a solution to this for slightly older versions but it appears the language changed a bit and those solutions no longer apply..at least not directly.. Version 1.5.1, I simply want the subcategories for the categories side menu to always show, instead of just when the parent category is selected. I have played around with the category.php found under catalog>contoller>module, but no luck yet. Any solution or guidance? thanks!

Newbie

Posts

Joined
Thu Jul 28, 2011 2:07 pm

Post by jesycjesyc » Mon Nov 07, 2011 2:58 am

I also want to know, does anyone has idea? Thanks a lot!

Online store of women's handbags and fashion accessories. Free shipping to WORLDWIDE! www.jesyc.com


New member

Posts

Joined
Fri Aug 19, 2011 10:13 am

Post by matlamont » Fri Nov 11, 2011 12:00 am

/catalog/view/theme/(your theme)/template/module/category.tpl

Around line 13 change

Code: Select all

 <?php if ($category['children']) { ?>
          <ul>
to

Code: Select all

 <?php if ($category['children']) { ?>
          <ul style="display:block">

http://www.burningdesirewales.co.uk


Newbie

Posts

Joined
Mon Sep 26, 2011 10:07 pm

Post by denizkumral » Thu Feb 16, 2012 5:16 pm

thanks, works perfect in 1.5.1.3

i'm having trouble changing the style of this categories module, can't play with font sizes, any ideas ?

Newbie

Posts

Joined
Fri Jan 27, 2012 4:55 pm

Post by donnie_barascco122 » Mon Sep 21, 2015 11:42 pm

Hello,

I have 1.5.6.4

I went to the file but it didn't work for me, what happend was out of my 5 different main catagories (which have a few sub cat underneath), only the first catagory showed and it blocked all the rest of it out.

Here is my code, maybe you can suggest something.

<script type="text/javascript">
$(document).ready(function() {
$('li.cat-header ul').each(function(index) {
$(this).prev().addClass('idCatSubcat')});
$('li.cat-header a').after('<span></span>');
$('li.cat-header ul').css('display','none');
$('li.cat-header ul.active').css('display','block');
$('li.cat-header ul').each(function(index) {
$(this).prev().addClass('close').click(function() {
if (
$(this).next().css('display') == 'none') {
$(this).next().slideDown(400, function () {
$(this).prev().removeClass('collapsed').addClass('expanded');
});
}else {
$(this).next().slideUp(400, function () {
$(this).prev().removeClass('expanded').addClass('collapsed');
$(this).find('ul').each(function() {
$(this).hide().prev().removeClass('expanded').addClass('collapsed');
});
});
}
return false;
});
});
});
</script>
<div class="box category">
<!--div class="box-heading"><?php echo $heading_title; ?></div-->
<div class="box-content">

<div class="box-category">
<ul>
<?php foreach ($categories as $category) { ?>
<?php if ($category['category_id'] == $category_id) { ?>
<li class="active cat-header">
<?php } else { ?>
<li class="cat-header">
<?php } ?>
<?php if ($category['category_id'] == $category_id) { ?>
<a href="<?php echo $category['href']; ?>" class="active"><?php echo $category['name']; ?></a>
<?php } else { ?>
<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
<?php } ?>
<?php if ($category['children']) { ?>

<?php for ($i = 0; $i < count($category['children']);) { ?>
<?php if ($category['category_id'] == $category_id) { ?>
<ul class="active">
<?php } else { ?>
<ul>
<?php }?>
<?php $j = $i + count($category['children']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<?php $id=$category['children'][$i]['category_id'];?>
<?php if ( $id == $child_id) { ?>
<li class="active">
<?php } else { ?>
<li>
<?php } ?>
<?php if ($category['children'][$i]['children3']) {?>
<a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name'];?></a>
<?php if ( $id == $child_id) { ?>
<ul class="active">
<?php } else { ?>
<ul>
<?php }?>
<?php foreach ($category['children'][$i]['children3'] as $ch3) { ?>
<li>
<?php if ($ch3['category_id'] == $ch3_id) { ?>
<a href="<?php echo $ch3['href']; ?>" class="active"><?php echo $ch3['name']; ?></a>
<?php } else { ?>
<a href="<?php echo $ch3['href']; ?>"><?php echo $ch3['name']; ?></a>
<?php } ?>
</li>
<?php } ?>
</ul>
<?php } else {?>
<a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name'];?></a>
<?php }?>
</li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
<?php } ?>
</li>
<?php } ?>
</ul>
</div>
</div>
</div>


Best regards
Donnie
O0


Posts

Joined
Thu Sep 17, 2015 9:19 pm
Who is online

Users browsing this forum: No registered users and 2 guests