| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
showing subcat list when viewing a product | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi
I'm using the root categories as a top menu. I want the first level subcategories to act as a sub-menu on the left when a subcategory is viewed and also when a product is viewed. Is this possible ? Cheers Loic
__________________
Version 4.2.0 |
|||||||
#2
|
|||||||
|
|||||||
![]() Not sure if I was clear enough so here is what I mean:
When viewing a product I'd like to have: CATEGORY 1 CATEGORY 2 CATEGORY 3 CATEGORY 4 -------------------------------------------------------------------------------------- CATEGORY 2 --------------- subcat 2.1 PRODUCT HERE subcat 2.2 subcat 2.3 subcat 2.4 I have used customer/main/subcategories_list.tpl but it disappears when viewing a product
__________________
Version 4.2.0 |
|||||||
#3
|
|||||||
|
|||||||
![]() Hi Loic,
Yes, it is possible to do what you are asking... try the mod in this thread... ALWAYS display first level subcats beneath root cats: http://forum.x-cart.com/showthread.php?t=13345 Robert
__________________
X-cart 4.1.10 |
|||||||
#4
|
|||||||
|
|||||||
![]() Thanks Robert
Hmm... no luck so far. Here is the code in 'subcategories_list.tpl' that I am trying to use to generate my sub-menu. It works but disappears when a subcategory is clicked and also when a product is viewed. I'd like it to stay visible to act as a sub-menu. <ul class="subcategories"> {foreach from=$subcategories item=subcat} <li> <a href="home.php?cat={$subcat.categoryid}">{$subcat. category|escape}</a> {if $config.Appearance.count_products eq "Y"} {if $subcat.product_count} ({$subcat.product_count} {$lng.lbl_products}) {elseif $subcat.subcategory_count} ({$subcat.subcategory_count } {$lng.lbl_categories|lower}) {/if} {/if} </li> {/foreach} </ul>
__________________
Version 4.2.0 |
|||||||
#5
|
|||||||
|
|||||||
![]() Quote:
To do what you want, you need to modify the categories.tpl file. Just follow the instruction at Post #10 here: http://forum.x-cart.com/showthread.php?t=13345 and for sorting the categories by position number and/or alphabetically, you may need to adjust the include/categories.php file as mentioned in Post #70 here: http://forum.x-cart.com/showthread.php?t=13345&page=7 Robert
__________________
X-cart 4.1.10 |
|||||||
|
|||
X-Cart forums © 2001-2020
|