X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Need to display a distinct category in a drop down menu (https://forum.x-cart.com/showthread.php?t=18642)

SailorChick_33588 12-13-2005 12:16 PM

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

balinor 12-28-2005 03:53 AM

Figure this one out?

SailorChick_33588 12-28-2005 07:34 AM

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


All times are GMT -8. The time now is 04:02 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.