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

Need Help ! Subcategory dropdown

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-17-2008, 03:57 AM
  Rajdeep's Avatar 
Rajdeep Rajdeep is offline
 

Senior Member
  
Join Date: May 2007
Posts: 115
 

Question Need Help ! Subcategory dropdown

Hi All !!

We are using Fancy Categories !!
There are multiple subcategories defined of a category. When I select a category half of the page is covered with subcategory listing, below which are display of products of that category.

Is it possible to show the subcategories in a dropdown list (with links to them, so that on select you go to that subcategory) for each Category you select?

Either a suitable mod or better ideas would be highly appreciated.....

Anyone ?????

I am looking for some mod which to me is interesting but couldn't crack it myself...



Thanks in advance.
__________________
X-Cart Pro 4.1.9
[Migrated from Gold 4.1.8 to Pro 4.1.9 - Feb 2008]
Add Ons: X-FancyCategories, X-Magnifier, X-FeatureComparison, X-SpecialOffers
Reply With Quote
  #2  
Old 05-17-2008, 04:32 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Need Help ! Subcategory dropdown

Depending on the number of cats and subcats, you may want to check out PhilJ's category mods:

http://www.xcartmods.co.uk/category/x-cart-navigation/

One of these may be what you are looking for?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 05-18-2008, 04:24 PM
 
tamicampos tamicampos is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 38
 

Default Re: Need Help ! Subcategory dropdown

Does anyone have one that is made for a horizontal nav bar? My categories are listed horizontally in the head.tpl and I really want to cut out a page by having the subcategories display (like a flyout menu) when the curser rolls over the category. Then I would like you to be able to click on the subcategory and go straight to that page which has the products for that subcategory thereby cutting out the page that lists all of the subcategories which I think is a waste. I have looked at length in the Forum and at Phil's Mods but I can't find one that does exactly what I want and unfortunately I am not yet adept at modifying the codes for vertical menus to work with my horizontal menu.

Any help is appreciated.
__________________
X-Cart 4.1.9
Reply With Quote
  #4  
Old 05-18-2008, 04:33 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Need Help ! Subcategory dropdown

http://www.xcartmods.co.uk/demos/418/home.php?hm=y

hover over DVD and watch the subcats flyout
or books> etc...

and yes, with Phil's mod you can change all the visual elements with CSS

PS this is Phil's horizontal flyout mod
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 05-18-2008, 04:48 PM
 
tamicampos tamicampos is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 38
 

Default Re: Need Help ! Subcategory dropdown

Thanks so much. I know I checked Phil's Mods but I must have missed it. Thanks for your guidance!
__________________
X-Cart 4.1.9
Reply With Quote
  #6  
Old 05-19-2008, 01:48 AM
  Rajdeep's Avatar 
Rajdeep Rajdeep is offline
 

Senior Member
  
Join Date: May 2007
Posts: 115
 

Default Re: Need Help ! Subcategory dropdown

Hi Carpeperdiem & Tamicampos,

Thanks for your responses. We have a huge category & subcategories & sub sub categories hence the links (xcartmods.co.uk) provided by you does not address my requirements.
As mentioned in my original post, when a customer clicks a category; half of the displayed page is covered with list of sub & sub-sub categories....
A customer has to really scroll down to view matching products. I hope I am able to explain the situation....



Can you please suggest some other ways/ mods ???

I'll really appreciate your support.

Thanks once again
__________________
X-Cart Pro 4.1.9
[Migrated from Gold 4.1.8 to Pro 4.1.9 - Feb 2008]
Add Ons: X-FancyCategories, X-Magnifier, X-FeatureComparison, X-SpecialOffers
Reply With Quote
  #7  
Old 06-04-2008, 01:22 PM
  boomobile's Avatar 
boomobile boomobile is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 306
 

Default Re: Need Help ! Subcategory dropdown

I have a similar issue, only I have a dropdown menu that has been created, but I don't know where to place anything within x-cart to make it function...If anyone can help with this, it'd be great:

I have the actual menu to be placed on customer/home.tpl (css-menu.tpl)
I have the CSS file to be added to skin1.css (css-menu.css)
I have a "styles" folder that contains (csshover.htc) I don't know exactly what this does or where it should go.

(Edit) - This is actually a "roll over" or "flyout" menu, not a dropdown.
__________________
X Cart Ver: 4.0.14
MySQL4 4.1.22
phpMyAdmin 2.6.0
Pearl 5.6.0
PHP 5.2.1
Python 2.2.2
Server: Apache/2.0.52 (Red Hat)
OS: Linux
www.cleanlinesurf.com
1. Customer Rewards Points
2. One Page Checkout (altercart)
3. Free shipping orders over $50 as Real Time Shipping
4. Gift Certificates
-----------------------------------------------
Graphic Design | Boomobile Design, LLC
www.boomobile.com
Reply With Quote
  #8  
Old 06-18-2008, 11:56 AM
 
ubergeek ubergeek is offline
 

Member
  
Join Date: Apr 2006
Posts: 22
 

Default Re: Need Help ! Subcategory dropdown

Maybe try something like this?

In subcategories.tpl find the block of code starts at or near 16 and end at 33

Code:
{if $subcategories} <table cellspacing="5" width="100%"> {foreach from=$subcategories item=subcat} <tr> {if $tmp and $first_subcat ne "Y"} <td valign="top" rowspan="{count value=$subcategories print="Y"}"><img src="{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/image.php?id={$cat}&amp;type=C{/if}" alt="" /></td> {assign var="first_subcat" value="Y"} {/if} <td class="SubcatTitle"><a href="home.php?cat={ $subcat.categoryid }"><font class="ItemsList">{ $subcat.category|escape }</font></a><br /></td> <td class="SubcatInfo">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if} {/if}</td> </tr> {/foreach} </table> {/if}

Replace this if statement with the following:

Code:
{if $subcategories} <FORM> <SELECT ONCHANGE="location = this.options[this.selectedIndex].value;"> <OPTION>Select Category...</OPTION> {foreach from=$subcategories item=subcat} <OPTION VALUE="home.php?cat={ $subcat.categoryid }">{ $subcat.category|escape } {if $config.Appearance.count_products eq "Y"} {if $subcat.product_count} ({ $subcat.product_count } {$lng.lbl_products}) {elseif $subcat.subcategory_count} ({ $subcat.subcategory_count } {$lng.lbl_categories|lower}) {/if}{/if}</OPTION> {/foreach} </SELECT> </FORM> {/if}

Probably could be cleaned up some but it should get you close.
__________________
Evolve Systems
Xcart: (50+ installs, ranging from 4.0.9 to 4.5.x)
php: 5.2.13 (Mostly)
MySQL: 5.0.95 (Mostly)
Reply With Quote
  #9  
Old 06-26-2008, 02:13 PM
  boomobile's Avatar 
boomobile boomobile is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 306
 

Default Re: Need Help ! Subcategory dropdown

Has anyone used a dynamic drive menu for x-cart? If so how and where is the code placed? I'm looking at a couple ideas, but would really like to use this one http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm
__________________
X Cart Ver: 4.0.14
MySQL4 4.1.22
phpMyAdmin 2.6.0
Pearl 5.6.0
PHP 5.2.1
Python 2.2.2
Server: Apache/2.0.52 (Red Hat)
OS: Linux
www.cleanlinesurf.com
1. Customer Rewards Points
2. One Page Checkout (altercart)
3. Free shipping orders over $50 as Real Time Shipping
4. Gift Certificates
-----------------------------------------------
Graphic Design | Boomobile Design, LLC
www.boomobile.com
Reply With Quote
  #10  
Old 07-03-2008, 03:22 AM
  Rajdeep's Avatar 
Rajdeep Rajdeep is offline
 

Senior Member
  
Join Date: May 2007
Posts: 115
 

Default Re: Need Help ! Subcategory dropdown

Quote:
Originally Posted by ubergeek
Maybe try something like this?

In subcategories.tpl find the block of code starts at or near 16 and end at 33

Code:
{if $subcategories} <table cellspacing="5" width="100%"> {foreach from=$subcategories item=subcat} <tr> {if $tmp and $first_subcat ne "Y"} <td valign="top" rowspan="{count value=$subcategories print="Y"}"><img src="{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/image.php?id={$cat}&amp;type=C{/if}" alt="" /></td> {assign var="first_subcat" value="Y"} {/if} <td class="SubcatTitle"><a href="home.php?cat={ $subcat.categoryid }"><font class="ItemsList">{ $subcat.category|escape }</font></a><br /></td> <td class="SubcatInfo">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if} {/if}</td> </tr> {/foreach} </table> {/if}

Replace this if statement with the following:

[code]
{if $subcategories}
[TRUNCATED....]

Probably could be cleaned up some but it should get you close.



Hi ubergeek,

We are using fancy categories (Icons) options.. Could not find the codes as mentioned by you in the subcategories.tpl file.

Could you suggest alternates. Help would be appreciated.

Thanks in advance.....
__________________
X-Cart Pro 4.1.9
[Migrated from Gold 4.1.8 to Pro 4.1.9 - Feb 2008]
Add Ons: X-FancyCategories, X-Magnifier, X-FeatureComparison, X-SpecialOffers
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:00 PM.

   

 
X-Cart forums © 2001-2020