![]() |
Main Categories as a drop down list
I couldn't find a post dealing with this.
By default, main categories are listed showing all categories either on the right or left side of the page. What I would like to do is show all main categories as a drop down list. Selecting a category will take the user to the respective subcategories page as happens now. This must be quite simple, I guess.... |
|
not exactly what I am looking for.
Here is a drawing of how I want it to appear... http://www.shopping.com.mv/mall/images/images2/cat.GIF |
I am sure this is quite simple to do ... Waiting for someone to save the day...
|
Hi there,
We have done this already. Backup /skin1/customer/categories.tpl Old Code Code:
{* $Id: categories.tpl,v 1.19 2003/11/11 14:02:32 svowl Exp $ *} Replace with this - New Code Code:
{* $Id: categories.tpl,v 1.19 2003/11/11 14:02:32 svowl Exp $ *} This for 3.5.0. May be incompatible with 3.4.x series. Always back up first!!!!! |
Could a moderator move this thread to "custom mods" for the benefit of other xcart users.
|
Thanks a lot for this mod... I was able to get it working on 3.4 with some minor modifications....
One question though: How can we make the selected category be shown in the drop down list even if we browse thorugh the subcategories... Now, when we select a subcategory the option select shown gets reset to "Select a category...."? |
To select the current category, change your option statement to:
<option class=CategoriesList value="{$categories[cat_num].categoryid}" {if $current_category eq $categories[cat_num]}selected{/if}>{$categories[cat_num].category_name|escape}</option> -> Al |
MOD possible also for just 1 category?
Great MOD!
Is it possible to have this MOD on just 1 category. I have setup categories for different products and 1 which is the main, this is the "Shop by brand". What would I need to change in this MOD to have it just for the shop by brand category so the customer is taken right to the selected brand page with subcategories? Thanks for any input. |
Inside the {section} loop use
Code:
{if $cateogires[cat_num].categoryid eq "55"} |
Busy upgrading to 3.5.3, but thanks.
Will test it when I am done :) |
Quote:
Strangely this code perfectly on my local pc but when I upload to server It doesn't select the "curent category" !!! what could be the wrong ? here is my code Code:
{* $Id: categories.tpl,v 1.19 2003/11/11 14:02:32 svowl Exp $ *} |
^BUMP^
Any one ? |
Code:
<form name="form_cat" method="get" action="home.php"> |
Thanks a lot Boomer...it's working now :)
Here is my code of categories.tpl if one want to use it. Code:
{* $Id: categories.tpl,v 1.19 2003/11/11 14:02:32 svowl Exp $ *} Just one more question this mode is not useful in html catalog as it doesn't generate the HTML links for categories in catalog pages & still generate the .php pages links :( .....is there any way to correct this bug ? |
I'm using this mod on 3.5.11 and it works perfectly, but I'm developing a store using 4.0.3 and have been unable to get it to work successfully. Does anyone know how to get this working with 4.x.x series because this is a great mod and I would love to continue using it.
|
This mod is working fine. Thanks to Boomer.
I am wondering what it would take to build it to the next level and include the subcategories indented under each of the main categories and separate each main category with a blank line (to make reading this list a little easier on the eyes.) I am not sure I understand the reason for the HTML build ?? If someone can explain. Thanks again to "Master" Boomer for its continuing effort in helping others build a better x-cart. Philippe |
When trying this in v4.0.4, the drop down box shows up, but appears to be empty. However, you can click on one of the "BlankSpaces" and you will be taken to the catagory.
Just fails to actually print the catagory name Any suggestions? Heres the code I am using: Code:
{* $Id: categories.tpl,v 1.19 2003/11/11 14:02:32 svowl Exp $ *} |
<form name="form_cat" method="get" action="home.php">
<td> <select name="cat" onChange="document.form_cat.submit()"> <option value="0">Select...</option> {section name=cat_num loop=$categories} <option class=CategoriesList value="{$categories[cat_num].categoryid}" {if $cat eq $categories[cat_num].categoryid}selected{/if}>{$categories[cat_num].category}</option> {/section} </select> </td> </form> |
Category Search Drop Down (v4.x)
Code:
<form name="form_cat" method="get" action="home.php"> Manufacturer Search Drop Down Code:
<form name="form_manuf" method="get" action="manufacturers.php"> Static Pages Drop Down Code:
<form name="form_info" method="get" action="pages.php"> :wink: |
I really like this dropdown catagory boxes. Ideal navigation menu for the site I am working on. The site will have main catagories and subcatagories as follows:
> Manufacturer names (HP, Canon, etc...) as main catagories. > Product Model as sub catagories But I want to automate a little. When user choose a main catagory, in this case manufacturer name, I like second dropdown box shows only sub catagories under that manufacturer. I know how to do in regular html coding but I have no experience in php coding or whatever X-cart uses. I tried PhilJ's code and it works for one drop down box. But I need atleast two level dropdown and possible three level in future. S-H-W-E-K-H-A-W |
Anyone have any samples of what this looks like? I am using version 3.58 and I have many categories listed on the side. However, I would like only some of them to be put in a drop down box above them so that my site will look cleaner and not have so many categories taking up space. I am guessing that if I do this mod, that ALL of my categories will end up in the drop down box? Anyone have a code for me to only have some of the cats in a dropdown? Thanks a lot!
|
Quote:
I would love to use this mod for just my manufacturers menu. In what .tpl would I place this code |
Quote:
skin1/customer/home.tpl copy the code to a new file - skin1/customer/manufacturers.tpl replace the code Code:
{ include file="modules/Manufacturers/menu_manufacturers.tpl" } with Code:
{ include file="customer/manufacturers.tpl" } |
Thanks for getting back to me. I just got it working and it's just what I wanted.
|
I'm having an issue with the number of manufacturers that are sowing up in the drop down menu.
It will only display ten manufacturers. If I deactivate one in the admin area a new one shows up in its place on the customer front end menu. I have twelve manufacturers in the admin area. I only get ten in the customer front end. I not sure what is going on. |
Quote:
*** Just wanted to alter PhilJ's words abit but with alot appreciated to you for creating this code tho!! Thanks! *** I was abit confused when i read his comment. For manufacturers only!!! Basicly, you created "manufacturers.tpl" and drop it in "skin1/customer/" Copy this code below in manufacturers.tpl: Code:
<form name="form_manuf" method="get" action="manufacturers.php"> find: Code:
{ include file="modules/Manufacturers/menu_manufacturers.tpl" } replace with Code:
{ include file="customer/manufacturers.tpl" } reload your homepage!!! Tada!! =D>=D>=D>=D>=D>=D>=D>=D> for PhilJ!! |
x-online I believe you have misunderstood me. I do however appreciate your help.
The mod works. I was able to to get the mod up and running. The problem is it only displays the first ten manufacturers in the drop down and I have double that. Thank You x-online and of-course PhilJ |
Khar,
I honestly didn't ready your post before about limited up to 10 manufacturers. Also, i only focused on the codes that philJ was given. Wheni first read his commend i was hum... open home.tpl... copied everything to manufactorys.tpl??!!?? then what?.. replaced code in manufactory.tpl??!!?? I just clear things up.. just incase if someone else stupid like me when first read it :P Anyhow, back to your problem.. i have seen the solution somewhere before int he forum.. Please do a search i am pretty sure that i have seen it before. Will keep you up to date if i came across again. |
thanks I'll start searching
|
Hello
I think if you go to MODULE SETTINGS/manufacturer list limit in the admin area you can increase the limit from 10 to whatever number you want. Regards Adam |
Yes mrbiggles you are right . That was simple enough.
That should of hit me. It's amazing how something so simple can slip by. THANK YOU THANK YOU. |
Quote:
Nice to finally find this answer!!! _now setting it to a really high number_ :) here is my version of the Drop Down Menu for Manufacturers: Code:
{* $Id: menu_manufacturers.tpl,v 1.4 2004/06/22 05:38:52 max Exp $ *} Under v4.0.12... goto: Web Admin -> Modules -> General Settings -> Modules Options... then edit value for "Manufacturers list limit" to something high obsurd like 250. Doing so will allow a complete list of Manufacturers to be shown. If you go over this "Manufacturer List Limit" value... then the "Other Manufacturers" link will show up... just up the "Manufacturers list limit" value higher again! Marko |
Hello:
This is the most useful topic! I have another twist to this drop down menu business: I need a drop drown menu for the subcategories of just one of my categories: Number 5. In on sentence, the form will have all the subcategories of category 5 as options. How would I code this? |
This code is great.
Thanks to all the contributors. :D |
Moving dropdown box into manufacturers box
I have applied the above code to create a drop down box for manufacturers. However, I cannot seem to get the dropdown box to move inside the menu box with label Manufacturers, and to be the same width as the box. Can anyone please help me with achieving this? I have searched and searched with no results. I created a file called manufacturers.tpl and called this in customer/home.tpl as below.
Code:
<TD width="150" valign="top"> |
Moving dropdown box into manufacturers box
I have applied the above code to create a drop down box for manufacturers. However, I cannot seem to get the dropdown box to move inside the menu box with label Manufacturers, and to be the same width as the box. Can anyone please help me with achieving this? I have searched and searched with no results. I created a file called manufacturers.tpl and called this in customer/home.tpl as below.
Code:
<TD width="150" valign="top"> |
Is there anyway to make the first MENU item on the dropdown menus not clickable?
and does anyone know why when the pages load the categories menu jumps up one place? thanks |
I love this mod. :D
One problem. I did the manufacturers and catagories but the catagories verticle box got wider by about 20 pixels. How do I adjust it back down to normal? |
style="width:70%"
or style="width:120px" Add or modify this in the <select> tag |
All times are GMT -8. The time now is 06:35 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.