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!
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
/catalog/view/theme/(your theme)/template/module/category.tpl
Around line 13 change
to
Around line 13 change
Code: Select all
<?php if ($category['children']) { ?>
<ul>
Code: Select all
<?php if ($category['children']) { ?>
<ul style="display:block">
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 ?
i'm having trouble changing the style of this categories module, can't play with font sizes, any ideas ?
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

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

Who is online
Users browsing this forum: No registered users and 2 guests