| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
ALWAYS display first level subcats beneath root cats | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#51
|
|||||||
|
|||||||
![]() @BornMunson
I'm having the exact same issue. It only shows the sub categories when I'm on the parent category page. And I am using 4.1.7, maybe that's the problem? Edit: Fixed it. Here's what I did (but the css is different) {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} <ul id="mainmenu"> {foreach from=$categories item=c} {if $cat eq $c.categoryid || $current_category.parentid eq $c.categoryid} <li><a href="home.php?cat={$c.categoryid}">{$c.category}< /a></li> {else} <li><a href="home.php?cat={$c.categoryid}">{$c.category}< /a></li> {/if} {assign var=in value=$c.categoryid} {* CONDITIONAL DROP DOWN ITEMS FROM TOP CATEGORY *} <ul id="submenu"> {foreach from=$allsubcategories.$in item=c } {if $cat eq $c.categoryid} <li><a href="home.php?cat={$c.categoryid}">{$c.category}< /a></li> {else} <li><a href="home.php?cat={$c.categoryid}">{$c.category}< /a></li> {/if} {/foreach} </ul> {* /CONDITIONAL *} {/foreach} {else} {foreach from=$subcategories item=c key=catid} <li><a href="home.php?cat={$catid}">{$c.category}</a></li> {/foreach} {/if} </ul> {/if}
__________________
4.1.8 |
|||||||
#52
|
|||||||
|
|||||||
![]() Thanks Surface51. That worked perfectly!!
__________________
X-Cart 4.7.3 |
|||||||
#53
|
|||||||
|
|||||||
![]() Quote:
You absolutely rock Chris! I had absolutely no idea how to do this. I may post another version I'm working of this if I ever get my bits to work. Thanks again!
__________________
X-Cart Version 4.1.10 www.memedia.com.au |
|||||||
#54
|
|||||||
|
|||||||
![]() just wondering, what *.tpl file does this code go in? and will it work with 4.1.8?
__________________
x-cart gold ver 4.1.8 |
|||||||
#55
|
|||||||
|
|||||||
![]() Quote:
You can pretty much put the code for the .tpl file into any .tpl file and display it anywhere you like on your site. It most certainly does work on 4.1.8 as is.
__________________
X-Cart Version 4.1.10 www.memedia.com.au |
|||||||
#56
|
|||||||
|
|||||||
![]() Help Please!
I'm trying to display a description beside each of the subcategories. and this is my first attempt at smarty. Somehow I managed to fumble my way forward and did get the descriptions to appear using another smarty variable / array (not sure of terminology sorry). Anyway.. here is my code. If anybody could maybe tell me where I'm going wrong I'd really appreciate it! Once I get it all working I'll post all code. PHP Code:
To Clarrify... I got most of the subcategory descriptions to display + images using the following code but could not get all of them to display the description and image. But all subcategory names most certainly did appear. PHP Code:
I've also included a screen shot. U can see the main category images then subcats with descriptions listed for the first "Root Categories" but it doesn't seem to work for the next "Root Categories" being the "Compression and Specials" seen below. http://www.memedia.com.au/subcats.jpg please help ![]()
__________________
X-Cart Version 4.1.10 www.memedia.com.au |
|||||||
#57
|
|||||||
|
|||||||
![]() Hi surface51 thank you for your input. I added it and I now have subcats but at the end of each one I have </a>
How do I get rid of the </a>? Many thanks Kevin
__________________
xcart gold 4.1.7 |
|||||||
#58
|
|||||||
|
|||||||
![]() Ok sorted it out
![]()
__________________
xcart gold 4.1.7 |
|||||||
#59
|
|||||||
|
|||||||
![]() Just wanted to say thank you to all who contributed to this thread. It really helped me out a bunch.
Thank you! ![]()
__________________
X-Cart 4.0.19 Gold on Linux |
|||||||
#60
|
|||||||
|
|||||||
![]() Quote:
Hi, unfortunately can’t make it work. Could you let me know what you changed in categories.php to fix it? Thanks a lot.
__________________
Tanya x-cart version: 4.1.7 4.1.9. 4.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|