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

How to List Sub Categories in a Dropdown Menu

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-30-2011, 07:10 PM
 
dennisvon dennisvon is offline
 

Member
  
Join Date: Feb 2006
Posts: 21
 

Default How to List Sub Categories in a Dropdown Menu

How to program a dropdown menu that lists the subcategories of category 299?

With the current dropdown when on home page the menu lists all root level categories,

but when on the page that lists the subcategories items of 299, then the dropdown menu lists only the subcategories.

I don't know the logic to make this work, can anyone help?

Code that I am using.

<select name="listCategories" onchange="window.location=this.options[selectedIndex].value">
<option value=""><font class="VertMenuItems">Select A Cigary</font></option>
{foreach from=$categories_menu_list item=c name=categories}
{if $c.order_by = 299 && $c.product_count ne 0}
<option value="home.php?cat={$c.categoryid}">{$c.category} </option>
{/if}
{/foreach}
</select>

</form>
__________________
Version 4.4.2
www.smokeinn.com

Last edited by dennisvon : 03-30-2011 at 07:11 PM. Reason: minor change
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 12:20 AM.

   

 
X-Cart forums © 2001-2020