Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Only show sub catagories

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-31-2004, 11:07 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default Only show sub catagories

how can I set up x-cart to only display sub catagories?

I have built main nav into the top header - So main navigation is always there... now I need to adjust x-cart to only display the sub catagories in the left -hand column.

I'm working with X-cart vs. 3.5.12
Reply With Quote
  #2  
Old 04-11-2005, 07:32 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default only show sub categories

Still need assistance setting up x-cart vs. 4.0.12x to display sub catagories in left column.

I have built main navigation within the header. When main navigation is selected I want the sub categories of that item to appear in the left hand column. Any ideas how to accomplish this?
Reply With Quote
  #3  
Old 04-11-2005, 10:06 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default

Hi Hyperdelicious,

The following is not mine, but I've got it from the forum (but I can't find the thread at the moment).

Same as you I've got the main navigation in the header. Clicking on one of these categories brings up the subcategories in the left menu. One problem I'm having is that it only shows the first level of subcategories - no deeper levels of subcategories. Another (but smaller) problem is that it won't display the categorie name above the subcategories.

I did the following:

In /skin1/customer/categories.tpl:
Code:
{if $current_category.category ne "" and $config.General.root_categories ne "Y"} { include file="customer/subcategories.tpl" }{/if}

Then I made a new file in that same folder /skin1/customer/categories.tpl and called it: subcategories.tpl

Code:
{* $Id: subcategories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {section name=cat_num loop=$allcategories} {if $allcategories[cat_num].parentid eq $location[1].1|replace:"home.php?cat=":""} <table border="0" width="100%" class="SubMenuOff" onMouseOver="this.className='SubMenuOn'" onMouseOut="this.className='SubMenuOff'" id="table2" cellspacing="0" cellpadding="0"><a href="home.php?cat={ $allcategories[cat_num].categoryid }"> <tr> <td width="100%" height="18">{ $allcategories[cat_num].category|escape }</font> { $allcategories[subcat_num].category|escape }</font> </td> </tr> <tr> <td height="1" bgcolor="#FFFFFF" width="100%" colspan="2"> </tr> </table> {/if} {/section} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_subcategories menu_content=$smarty.capture.menu }

You have to tweak the above to your own layout, because I'm using (css)rollovers.
If somebody knows the solution for displaying not only the first level, but also the deeper levels, please let me know!

Good luck, Hyperdelicious!
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #4  
Old 04-12-2005, 08:21 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default sub category display

Thanks for the input Jerrad. However, after posting that message yesterday, I decided to search the forums again for a sub navigation mod. A search for 'display sub categories only' led me to this post http://forum.x-cart.com/viewtopic.php?t=12058&highlight= started by zilker. I found it to be a workable solution. Thanks.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:11 AM.

   

 
X-Cart forums © 2001-2020