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

Highlight categories and subcategories

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-25-2007, 11:35 AM
 
pmalerba pmalerba is offline
 

Member
  
Join Date: Sep 2007
Posts: 17
 

Question Highlight categories and subcategories

Hi to everyone!

I'm trying to get work correctly categories and subcategories.

Now my categories.tpl is:

PHP Code:
{* $Idcategories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *}
<
h3>{$lng.lbl_categories}</h3>
{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"}
{foreach 
from=$categories item=c}
<
tr align="left"><td><a href="home.php?cat={$c.categoryid}class="mainlevel">{$c.category}</a></td></tr>
{foreach 
from=$allcategories item=cat}
{if 
$cat.parentid eq $c.categoryid}
<
tr align="left"><td><div style="padding-left: 4px"><img src="{$SkinDir}/images/indent1.png" alt="" /><a href="home.php?cat={$cat.categoryid}class="sublevel" >{$cat.category}</a></div></td></tr>
{/if}
{/foreach}
{/foreach}
{else} {foreach 
from=$subcategories item=c key=catid}
<
tr align="left"><td><a href="home.php?cat={$catid}class="sublevel">{$c.category}</a></td></tr>
{/foreach}
{/if}
{/if} 


The categories works fine but i have 2 big problems that i'm not able to solve:

1- When i go to a category or to a subcategory i'd like to have a css class active (like the hover) to highlight that we are in that category / subcategory
Here you can see the category Not Highlight: http://www.toyshunter.it/store/chogokin-c-3.html ( see the menu on the right Categorie)

2- When i go to a subcategory "magically" the subcategory on the menu disappearing! I cannot understand why!
Here you can see the magic disappearing of subcategories:
http://www.toyshunter.it/store/bandai-soul-of-chogokin-c-11.html ( see the menu on the right Categorie)

Thanks for your help!
__________________
X-Cart v 4.1.8
X-Cart v 4.1.11
Reply With Quote
  #2  
Old 11-25-2007, 12:19 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Highlight categories and subcategories

Hi pmalerba, would you take a moment to correct your signature? There is no version 4.8 of X-Cart..perhaps you mean 4.1.8 or 4.0.18?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 11-25-2007, 01:12 PM
 
pmalerba pmalerba is offline
 

Member
  
Join Date: Sep 2007
Posts: 17
 

Default Re: Highlight categories and subcategories

Quote:
Originally Posted by balinor
Hi pmalerba, would you take a moment to correct your signature? There is no version 4.8 of X-Cart..perhaps you mean 4.1.8 or 4.0.18?

I'm sorry! Now is correct! Thanks for your attention!
__________________
X-Cart v 4.1.8
X-Cart v 4.1.11
Reply With Quote
  #4  
Old 04-29-2008, 08:42 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default Re: Highlight categories and subcategories

pmalerba,

I like how you did your category menu. Is the code above the one you are using right now that's making it work right?

Basically I want hover effect and then highlight the current category on the menu. Just like u did.
__________________
X-Cart 4.0.18 DBest
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:33 AM.

   

 
X-Cart forums © 2001-2020