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

Need to display a distinct category in a drop down menu

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-13-2005, 12:16 PM
  SailorChick_33588's Avatar 
SailorChick_33588 SailorChick_33588 is offline
 

Newbie
  
Join Date: Nov 2005
Location: California
Posts: 8
 

Default Need to display a distinct category in a drop down menu

Hi out there,

I am about half-way through my first project using x-cart and since I am brand new to php I need some advice.

I want a drop down box on my home page that has only two of my 9 categories listed.

I have this code inserted into my index_new.tpl file:
Code:
<div align="center">[img]{$ImagesDir}/show_watches.gif[/img] <form name="form_brand" method="get" action="home.php"> <select onChange="this.form.submit()"> <option value="0" selected>Shop by Gender</option> {section name=cat_num loop=$categories} <option value="{$categories[cat_num].categoryid}">{$categories[cat_num].category}</option> {/section} </select> </form> </div>
The entire list of categories is displayed in the drop down. What I want is to only have the category ID's 258 & 250 show.

I'm hoping this is an easy thing that has been done before. I've searched the forums though and haven't found anything quite like what I am wanting to do. Any help would be greatly appreciated!!!

So far it seems like there is an answer to everything on these forums!

TIA
__________________
x-cart gold (unix)
Version 4.0.16
Reply With Quote
  #2  
Old 12-28-2005, 03:53 AM
 
balinor balinor is offline
 

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

Default

Figure this one out?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 12-28-2005, 07:34 AM
  SailorChick_33588's Avatar 
SailorChick_33588 SailorChick_33588 is offline
 

Newbie
  
Join Date: Nov 2005
Location: California
Posts: 8
 

Default

Uhm.. Yes and No!

I figured out that in order to do what I want, I need to change the categories.php file, which at this point might be a little beyond me.

So in the meantime, I hard coded the category links I wanted into my dropdown using some JavaScript.

This will work in the short term, till I figure out how to modify the categories.php file to do what I want.

Unless anyone has a better suggestion... :P

Thanks,
SailorChick
__________________
x-cart gold (unix)
Version 4.0.16
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 03:30 PM.

   

 
X-Cart forums © 2001-2020